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

How to make "concurrently -k" return exit code 0 when other commands are killed #403

Closed exKAZUu closed 1 year ago

exKAZUu commented 1 year ago

I employ concurrently to test a web app on CI. The command is like yarn concurrently -s last -k "sleep 100000" "echo test". The first command launches a web app and doesn't stop, and the last command tests the web app. If the last command (e.g. echo test) returns exit code 0, I want concurrently to return exit code 0, too. But, it returns a non-zero exit code (1). How can I avoid a non-zero exit code in this case?

I've tested the above command on the Ubuntu and Mac OS.

Thanks

exKAZUu commented 1 year ago

I've misunderstood the meanings of -s. I should use yarn concurrently -s first -k "sleep 100000" "echo test". Sorry for opening an meaningless issue ...