X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/366a2efdd0ac4630f4381f3b47d70ef155ed2df4..0020a0bc96ee13203fbdc2af28ffa077799213d0:/build/run-library.sh?ds=sidebyside diff --git a/build/run-library.sh b/build/run-library.sh index af95cdc601..cb5549df71 100755 --- a/build/run-library.sh +++ b/build/run-library.sh @@ -104,6 +104,9 @@ handle_ruby_gem() { } calculate_go_package_version() { + # $__returnvar has the nameref attribute set, which means it is a reference + # to another variable that is passed in as the first argument to this function. + # see https://www.gnu.org/software/bash/manual/html_node/Shell-Parameters.html local -n __returnvar="$1"; shift local src_path="$1"; shift @@ -226,6 +229,15 @@ test_rails_package_presence() { } get_complete_package_name() { + # if the errexit flag is set, unset it until this function returns + # otherwise, the shift calls below will abort the program if optional arguments are not supplied + if [ -o errexit ]; then + set +e + trap 'set -e' RETURN + fi + # $__returnvar has the nameref attribute set, which means it is a reference + # to another variable that is passed in as the first argument to this function. + # see https://www.gnu.org/software/bash/manual/html_node/Shell-Parameters.html local -n __returnvar="$1"; shift local pkgname="$1"; shift local version="$1"; shift