From b4f33c5df48b0f0402f9685b7f35fd7c58ce4720 Mon Sep 17 00:00:00 2001 From: Tim Coalson Date: Thu, 26 Sep 2024 23:47:35 -0500 Subject: [PATCH] fix unset variable testing under set -u --- ICAFIX/ReApplyFixPipeline.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICAFIX/ReApplyFixPipeline.sh b/ICAFIX/ReApplyFixPipeline.sh index e1bd0c720..db27c3fec 100755 --- a/ICAFIX/ReApplyFixPipeline.sh +++ b/ICAFIX/ReApplyFixPipeline.sh @@ -319,7 +319,7 @@ 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 @@ -327,7 +327,7 @@ case ${MatlabRunMode} in 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