[BUG] npm-run
runs in background if it cannot write logs
#6520
Labels
npm-run
runs in background if it cannot write logs
#6520
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When I run this command
$ sudo -u nobody sh -c 'npm run server'
I get the following output:
At this point my server is still running, as a background process. (as if I ran the command with
&
, but I did not.)I know I can fix the EACCES by making sure the path is writable using
sudo -u nobody sh -c 'npm run server --cache .'
, my problem is that npm does not handle the error in an expected way.Expected Behavior
I would expect that either
A) The server stops and the process exits with an error code due to the errors being fatal, OR
B) The process runs in the foreground ignoring non-fatal errors.
Steps To Reproduce
Now run
sudo -u nobody sh -c 'npm run server'
, where-u nobody
causes npm not to be able to write logs.Environment
The text was updated successfully, but these errors were encountered: