diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2021-04-27 13:02:55 +0200 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-04-27 13:02:55 +0200 |
| commit | 3bd2f3dc81469a6a7f31a7096677fc11ed06ed30 (patch) | |
| tree | 691eee3feedb713a59fb9f6fdf10baf317d24f7d /utils/build_env.py | |
| parent | 9b482e8fccfc5e5504e4c8abdb60ce5c11678018 (diff) | |
[fix] manage - fix miss usage of 'set -e'
The philosophy of set -e is typically that it only exits upon uncaught
errors. Here, the presence of || outside the subshell seems to tell the shell
that the error inside the subshell is 'caught' and therefore set -e does not
cause an exit after false [1].
The shell does not exit if the command that fails is ... part of any command
executed in a && or || list except the command following the final && or ||, any
command in a pipeline but the last, or if the command’s return status is being
inverted with ! [2]
[1] https://unix.stackexchange.com/questions/296526/set-e-in-a-subshell
[2] https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html#The-Set-Builtin
BTW: fix error reported by 'make test.shell'
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/build_env.py')
0 files changed, 0 insertions, 0 deletions