You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ parallelshell "ls asdf"
ls: asdf: No such file or directory
$ echo $?
1
With multiple commands it exits with 1 when the first command exits with 1:
$ parallelshell "ls asdf" "ls ."
asdf: No such file or directory
$ echo $?
1
But when the first command succeeds and second fails, it exits with 0:
$ parallelshell "ls ." "ls asdf"
asdf: No such file or directory
$ echo $?
0
I tried using --wait but then it always exits with 0.
But the documentation says:
If command1 or command2 exit with non-zero exit code, then this will not effect the outcome of your shell (i.e. they can fail and npm/bash/whatever will ignore it). parallelshell will not ignore it, and will exit with the first non-zero exit code.
The text was updated successfully, but these errors were encountered:
nene
changed the title
Exit code
Exit code is 0 when first command succeeds and second fails
Nov 24, 2016
With single command the exit code is as expected:
With multiple commands it exits with 1 when the first command exits with 1:
But when the first command succeeds and second fails, it exits with 0:
I tried using
--wait
but then it always exits with 0.But the documentation says:
The text was updated successfully, but these errors were encountered: