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

Behavior of semi-colon in macros is confusing #59

Open
michaeleisel opened this issue Feb 5, 2024 · 1 comment
Open

Behavior of semi-colon in macros is confusing #59

michaeleisel opened this issue Feb 5, 2024 · 1 comment

Comments

@michaeleisel
Copy link

michaeleisel commented Feb 5, 2024

In a shell script, a semi-colon indicates that the next command should run regardless of if the preceding command succeeds. However, in run_cmd!, a semi-colon behaves like && instead. Ideally, both && and ; would be supported and behave like they do in a shell command, or if that's not possible, the README would make it extra clear how it differs.

@tao-guo
Copy link
Collaborator

tao-guo commented Feb 5, 2024

You can consider this library is doing set -euo pipefail for your script to try to catch all the errors, without introducing other pitfalls. Yeah, I can try to update the README a little bit more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants