cli icon indicating copy to clipboard operation
cli copied to clipboard

netlify deploy --build --prod runs with dev context

Open lotarbo opened this issue 2 years ago • 1 comments

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

  1. create new branch ex: feature/netlify
  2. 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

lotarbo avatar Jul 18 '23 16:07 lotarbo