Revision 9298
Added by Aaron Marcuse-Kubitza about 11 years ago
util.run | ||
---|---|---|
23 | 23 |
|
24 | 24 |
# users can override run_args_cmd to perform other commands (or no commands) |
25 | 25 |
# after the script is read |
26 |
on_exit() { run_args_cmd; } |
|
26 |
on_exit() { test $? -eq 0 || return; run_args_cmd; }
|
|
27 | 27 |
trap on_exit EXIT |
28 | 28 |
|
29 | 29 |
func_override set_paths__util_sh |
Also available in: Unified diff
lib/sh/util.sh: run_args_cmd(): moved test of $? to lib/runscripts/util.run on_exit() since it needs to be performed for all run_args_cmd() functions, not just the default implementation. (this test ensures that no commands are executed if the EXIT trap was encountered due to a parsing/loading error).