-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaks when command contains &&
?
#31
Comments
In some cases, running things in parallel is not enough. e.g, i fire up a docker container and then I want to run some integration tests against it. Thus, I thought I'd just sleep a short time before before starting the tests, when they are done RW-MBP-15: ~
→ sleep 1 && echo hello
hello
RW-MBP-15: ~
→ concurrently 'sleep 1 && echo hello'
[0] usage: sleep seconds
[0] sleep 1 && echo hello exited with code 1 |
+1 Separating different commands with semi-colon doesn't seem to work either. |
Yeah this sucks and should be fixed. We should have all shell capabilities in the commands but haven't found a good way to do it well cross-platform. I'll try to peak what parallelshell does. If someone has a fix, I'll merge a PR. |
Could you test if this has been fixed by installing 3.0.0-dev version: |
@kimmobrunfeldt |
What do you mean by "is still incorrectly passing"? To me this behaviour seems to be correct: ➜ concurrently git:(master) ✗ concurrently 'echo 1 && exit 1' 'echo 2 && exit 2'
[0] 1
[1] 2
[1] echo 2 && exit 2 exited with code 2
[0] echo 1 && exit 1 exited with code 1
➜ concurrently git:(master) ✗ echo $?
1 concurrently returns with exit code 1. |
@rweng also now ➜ concurrently git:(master) ✗ concurrently 'sleep 1 && echo hello'
[0] hello
[0] sleep 1 && echo hello exited with code 0 (with the dev version: |
On my machine i was getting a zero exit code. |
Are you sure you uninstalled the old one and used 3.0.0-dev version? Also are you sure that your platform shell is compatible with those commands?(just making sure, I know that most probably it is compatible) Which OS are you running? E.g in Macs, spawn-default-shell will use the shell defined in SHELL env or /bin/bash -c "..." to run the given commands. I also made a test case for this - it passed on my Mac but I can double check on Travis CI too. |
It's a Mac, stock, using bash. I'll try again this evening, just in case something went wrong with my install. |
Ok I'll commit the test case to master later today too. |
The test case is here https://github.com/kimmobrunfeldt/concurrently/blob/master/test/test-functional.js#L78 and it is passing in Travis: https://travis-ci.org/kimmobrunfeldt/concurrently |
Hmm, I must have made a mistake, because I definitely have 3.0.0-dev installed, didn't change anything, and got the proper exit codes. Thanks! |
These issues should be now fixed in 3.0.0-rc1. You can test by installing it: |
If you clone https://github.com/airbnb/mocha-wrap and check out the
concurrently
branch, you'll see thatnpm run tests-only
fails with, for example, "Error: cannot resolve path (or pattern) '&&'".I would assume that
concurrently 'foo' 'bar'
would work for anyfoo
orbar
, even if it was multiple commands strung together serially.The same tests work fine on the
master
branch withparallelshell
.The text was updated successfully, but these errors were encountered: