Describe the bug
In netlify.toml, when I write this dev command
[dev]
command = "bundle install && bundle exec jekyll serve --port 4002 --incremental --future"
the shell command netlify dev responds with
⬥ Starting framework dev server
Unknown switches "--port", "--incremental", "--future"
Did you mean? "--path"
⠹ Waiting for framework dev server to be ready on port 4002⬥ Command failed with exit code 15: bundle install && bundle exec jekyll serve --port 4002 --incremental --future. Shutting down Netlify Dev server
It appears that netlify dev parses the string && as if it were an argument to the bundle install command, rather than as the bash operator.
When I use netlify build, this problem doesn't occur.
Steps to reproduce
- In
netlify.toml, specify a [dev] command that connects two bash commands with &&.
- Run
netlify dev.
The command fails.
This behavior is the same when I try to use the --command switch.
When the [build] command has && in it, netlify build behaves as expected.
Configuration
Sample contents of netlify.toml:
[build]
command = "bundle install && bundle exec jekyll build --future"
publish = "www"
[dev]
command = "bundle install && bundle exec jekyll serve --port 4002 --incremental --future"
targetPort = 4002
Environment
- Pop!_OS 24.04, Linux 6.18.7-76061807-generic #202601231045
176970322824.04~cb87b5b SMP PREEMPT_DYNAMIC Thu J x86_64 x86_64 x86_64 GNU/Linux
- zsh 5.9
- netlify-cli/26.0.0 linux-x64 node-v20.20.2
Describe the bug
In
netlify.toml, when I write thisdevcommandthe shell command
netlify devresponds withIt appears that
netlify devparses the string&&as if it were an argument to thebundle installcommand, rather than as thebashoperator.When I use
netlify build, this problem doesn't occur.Steps to reproduce
netlify.toml, specify a[dev]command that connects twobashcommands with&&.netlify dev.The command fails.
This behavior is the same when I try to use the
--commandswitch.When the
[build]command has&&in it,netlify buildbehaves as expected.Configuration
Sample contents of
netlify.toml:Environment
176970322824.04~cb87b5b SMP PREEMPT_DYNAMIC Thu J x86_64 x86_64 x86_64 GNU/Linux