Skip to content
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

Task doesn't fail when using "set -e" or "return" without parameter #32

Closed
stylemistake opened this issue Dec 5, 2018 · 1 comment
Closed
Labels
Projects

Comments

@stylemistake
Copy link
Owner

stylemistake commented Dec 5, 2018

Something is seriously broken here, need to investigate.

Easiest way to reproduce is to check task_publish-npm() function in runnerfile.sh.

Right now, npm publish || return "${?}" form is used, which errors out just fine, but npm publish || return does not error out. In fact, it returns 0 every time.

Will add tests someday, because this issue pops up multiple times.

@stylemistake stylemistake added this to To do in Roadmap Dec 6, 2018
@stylemistake stylemistake removed this from To do in Roadmap Mar 23, 2019
@stylemistake stylemistake added this to Done in Roadmap Apr 5, 2019
@stylemistake
Copy link
Owner Author

stylemistake commented Apr 5, 2019

Currently the best solution seems to avoid conditional operators (||, &&) at all costs when chaining commands inside the "runner" itself, because they forcefully reset the set -e flag which you can't re-enable later.

It seems I have done a good job at keeping the next branch clean of such things. We can finally use set -e inside tasks, so you no longer need to write <command> || return ${?} everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Roadmap
  
Done
Development

No branches or pull requests

1 participant