Description
Describe the bug
When you run the command netlify deploy --no-build
, after it succeeds and provides the draft URL, it also provides a helpful instruction on how to deploy it to live if you're happy, however, this command is now incorrect...
If everything looks good on your draft URL, deploy it to your main site URL with the --prod flag:
netlify deploy--no-build --prod
There is no longer the necessary whitespace ( ) between deploy
and --no-build
which will cause the command to fail if you try and run it:
netlify deploy--no-build --prod
› Error: unknown option '--prod'
› See more help with --help
The issue arises from here:
https://github.com/netlify/cli/blob/main/src/commands/deploy/deploy.ts#L709C50-L709C65
And was introduced in this pull request #7250.
Before:
${runBuildCommand ? ' --build' : ''}
After:
${runBuildCommand ? '' : '--no-build'}
The command has changed per documentation, which is fine, but the whitespace before it is missing.
/cc: @serhalp
Steps to reproduce
- Run
netlify deploy --no-build
- Get the incorrect deploy message back
Configuration
No response
Environment
System:
OS: macOS 15.4.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 2.43 GB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - /usr/local/bin/node
Yarn: 4.9.1 - /usr/local/bin/yarn
npm: 11.3.0 - /usr/local/bin/npm
npmGlobalPackages:
netlify-cli: 21.2.1