General fix to all shell scripts to correctly exit script when calling a sub script fails.
TLDR:
we have set -e in scripts that needs to exit when a subscript fails.
Using this:
output=$( expression )
captures output but doesn't cause calling script to exit with error. (You have to manually check exit code with $?)
output=`expression`
Works better because it captures output and a non zero exit code from the expression/script with make the calling script exit correctly with an error code.
Depends on https://github.com/Joystream/joystream/pull/4913 and https://github.com/Joystream/joystream/pull/4935
General fix to all shell scripts to correctly exit script when calling a sub script fails.
TLDR: we have
set -e
in scripts that needs to exit when a subscript fails.Using this:
captures output but doesn't cause calling script to exit with error. (You have to manually check exit code with
$?
)Works better because it captures output and a non zero exit code from the expression/script with make the calling script exit correctly with an error code.
┆Issue is synchronized with this Asana task by Unito