Skip to content

Commit

Permalink
fix unset variable testing under set -u
Browse files Browse the repository at this point in the history
  • Loading branch information
coalsont authored Sep 27, 2024
1 parent 9f52e6b commit b4f33c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ICAFIX/ReApplyFixPipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,15 @@ case ${MatlabRunMode} in
# fix_3_clean is part of the FIX distribution.
# If ${FSL_FIX_MCR} is already defined in the environment, use that for the MCR location.
# If not, the appropriate MCR version for use with fix_3_clean should be set in $FSL_FIXDIR/settings.sh.
if [ -z "${FSL_FIX_MCR}" ]; then
if [ -z "${FSL_FIX_MCR:-}" ]; then
debug_disable_trap
set +u
source ${FSL_FIXDIR}/settings.sh
set -u
debug_enable_trap
export FSL_FIX_WBC="${Caret7_Command}"
# If FSL_FIX_MCR is still not defined after sourcing settings.sh, we have a problem
if [ -z "${FSL_FIX_MCR}" ]; then
if [ -z "${FSL_FIX_MCR:-}" ]; then
log_Err_Abort "To use MATLAB run mode: ${MatlabRunMode}, the FSL_FIX_MCR environment variable must be set"
fi
fi
Expand Down

0 comments on commit b4f33c5

Please sign in to comment.