Replies: 1 comment 1 reply
-
I have no way of knowing if this will negatively impact other users. The rationale behind it being minimal, is that it should be the opposite of strict; the most minimal recommended / needed by bashly. Fully customizable with sensible defaults. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed that by default bashly puts
set -e
in theinitialize
function. Which is great!I suggest to also include
-o pipefail
, as it's a sane default.NOTE: I'm aware about the
strict
setting option, what I'm suggesting here is to also add-o pipefail
by default.For reference:
set -o pipefail
makes the exit code of a sequence of piped commands to be the status of the last command with a non-zero status (or zero if all commands ran succesfully).Here are two examples with and without
-o pipefail
.nopipefail.sh
:running it:
As you can see 👆 , the script continued the execution when it (normally) shouldn't.
withpipefail.sh
:running it:
Beta Was this translation helpful? Give feedback.
All reactions