3 ms·
Nope, the -E has to do with the "trap" command. This example happily echoes "hello" to stdout: #!/bin/bash set -euE -o pipefail FOO=/this/does/not
by aidenn0 6y ago
Nope, the -E has to do with the "trap" command. This example happily echoes "hello" to stdout:
#!/bin/bash
set -euE -o pipefail
FOO=/this/does/not/exist
foo() {
cd "$FOO"
echo hello
}
if foo; then true; fi
- graton 6y agoWell in that case it appears to be because of using "if foo" But that might have been your point in the first place :) I wasn't aware of the change in behavior with an 'if' statement. As a note, trap ERR had the same behavior as 'set -e' from my quick check. This dies: #!/bin/bash set -euE -o pipefail FOO=/this/does/not/exist foo() { cd "$FOO" echo hello } foo echo We do not reach here