We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
shellcheck --version
#!/bin/sh set -e foo && bar || true
foo && bar || true ^-- [SC2015](https://www.shellcheck.net/wiki/SC2015) (info): Note that A && B || C is not if-then-else. C may run when A is true.
Nothing, the || true is used to ignore return codes so even if it get executed when A is true it doesn't matter.
|| true
The text was updated successfully, but these errors were encountered:
Workaround: Currently this can be bypassed by using command groupings.
#!/bin/sh set -e # $? will be 0 { foo && bar; } || :
Sorry, something went wrong.
Thanks for the link, very insightful.
Successfully merging a pull request may close this issue.
For bugs
shellcheck --version
or "online"): onlineHere's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
Nothing, the
|| true
is used to ignore return codes so even if it get executed when A is true it doesn't matter.The text was updated successfully, but these errors were encountered: