cli
cli copied to clipboard
netlify deploy --build --prod runs with dev context
Describe the bug
Hello, i think that when i run deploy command with --prod context should be production ?
Or context depends on git branch, etc?
ps: I know that i can pass --context
Steps to reproduce
- create new branch ex: feature/netlify
- run netlify deploy --build --prod
Configuration
[build] command = "npm run export && cp ./netlify-headers/_dev-headers ./out/_headers" publish = "out"
[[headers]] for = "/*" [headers.values] X-XSS-Protection = "1; mode=block" X-Content-Type-Options = "nosniff" Referrer-Policy = "no-referrer-when-downgrade" Content-Security-Policy = "default-src 'self' http: https: ws: wss: data: blob: 'unsafe-inline'; frame-ancestors 'self';" Permissions-Policy = "interest-cohort=()" Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
[context.production] command = "npm run export"
Environment
System: OS: macOS 13.4.1 CPU: (10) arm64 Apple M1 Pro Memory: 790.27 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.18.0/bin/yarn npm: 9.3.1 - ~/.nvm/versions/node/v16.18.0/bin/npm pnpm: 7.27.0 - ~/.nvm/versions/node/v16.18.0/bin/pnpm npmPackages: netlify-cli: ^15.9.0 => 15.9.0 npmGlobalPackages: netlify-cli: 15.9.0