Closed loklaan closed 3 years ago
Am happy to get a PR together for this if this is in fact a bug!
Would you mind putting those steps into a public repository that can be cloned?
@jmcdo29 No worries - added to OP
I can definitely reproduce it, and it does seem to be coming from the CLI. Everything under the hood ends up going through commander
, but if I remember right, process.exit(1)
should bubble up through there, so it seems something else is at play.
Fixed in this commit https://github.com/nestjs/nest-cli/commit/dd2217179ce701d6c6005dc342458ab1ccade216 and published as 7.5.5
Much appreciated @kamilmysliwiec 😍
I'm submitting a...
Current behaviour
Similar to what was reported in #423, the
next start
exists with a code0
regardless of what the underlying child process exits with.Expected behaviour
The
nest start
command should exit with the code given by the child process.Minimal reproduction of the problem with instructions
See loklaan/repro-nestcli__nest-start-exit-code
What is the motivation / use case for changing the behavior?
Have things like CI/CD pipelines function correctly when using
nest start
.Worth mentioning that a workaround for this is as follows:
I'm guessing this is what everyone does right now. Or in most cases the dist in managed by pm2 etc.
Environment
MacOS / Linux (Ubuntu)