Command Substitution & Error Codes #687
-
Hi all, First time poster here and I have to say this is an incredibly versatile and powerful tool. Thank you for all the hard work! That being said I am incredibly confused by how command substitution (and I suppose by extension sub-shells) are handled by task . If I run the following bash, I see the expected error code output of 255
The same equivalent in task always returns a 0 error code:
Do I have some gap in my knowledge or is this behaviour entirely unexpected? Thank you :) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
What happens if you add a semicolon after line 1? What version of task are you running? Generally though, this may be an issue best directed at https://github.com/mvdan/sh for help. This is what is used under the hood of task. |
Beta Was this translation helpful? Give feedback.
-
I have the impression that this may be a by design decision of the shell library to not support some advanced things like this one. I opened an issue to check: mvdan/sh#828. |
Beta Was this translation helpful? Give feedback.
-
For those who check this discussion. There was indeed a bug with |
Beta Was this translation helpful? Give feedback.
For those who check this discussion. There was indeed a bug with
mvdan/sh
that consequently has been patched. In theory if the lib is updated with the next build of Task it should be resolved for us.