open-cli-tools / concurrently

Run commands concurrently. Like `npm run watch-js & npm run watch-less` but better.
https://www.npmjs.com/package/concurrently
MIT License
7k stars 228 forks source link

--kill-others should work with --success #404

Open ianpatton opened 1 year ago

ianpatton commented 1 year ago
40x commented 1 year ago

I have a similar issue I believe

I am using the package to run my integration tests. It does two things

  1. start the webpack dev server
  2. run the jest tests against it

Tests run successfully and exit with 0, that in turn triggers the SIGTERM being sent to other processes (as shown in the logs) but the exit code sent to the process on windows is 1 while it is SIGTERM on mac.

We rely on SIGTERM to do some clean-up but because of the way it exits right now, we are unable to do so only on windows.

On Windows -

image

On Mac - image

andy265 commented 1 year ago
  • Reproduction: concurrently --kill-others -s last "process-that-doesnt-exit" "tests-that-exit-cleanly"

I could suggest trying to change "last" to "first".

HoneyQumo commented 1 year ago

@andy265 it's not working. @dmidnight Is there any update on this issue?

gustavohenke commented 1 year ago

What @andy265 said is right. --success last refers to the last command to exit, not the last listed command.

@HoneyQumo can you provide any details about what's not working? If I don't have reproduction steps, I can't help.

gustavohenke commented 1 year ago

@40x it might be better to open a new issue for your use case. Windows wouldn't have signals, and so tailoring the experience for "exit code 1, but because it was 'interrupted'" is not possible; the process could have sent a different code.

manoelaog commented 11 months ago

What @andy265 said is right. --success last refers to the last command to exit, not the last listed command.

@HoneyQumo can you provide any details about what's not working? If I don't have reproduction steps, I can't help.

Just a suggestion, complement the documentation with this observation. The description of param are not clear and there are no examples to --success param.