From b908a13ddbccc1abecf4d7b5fe58f0a48e925b5d Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 16 Jul 2024 11:10:33 +0200 Subject: [PATCH] modulecmd: set -u commented out --- Pmodules/modulecmd.bash.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 8e587f8..7b6e70c 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -6,7 +6,7 @@ unset IFS # use default IFS shopt -s nullglob #set -e # exit on error -set -u # Treat unset variables as an error +#set -u # Treat unset variables as an error set -o pipefail # used in some output messages only @@ -3494,7 +3494,7 @@ if [[ -z "${subcommand}" ]]; then std::die 1 "${CMD}: no sub-command specified." fi -if [[ -z "${Subcommands[${subcommand}]}" ]]; then +if [[ ! -v Subcommands[${subcommand}] ]]; then std::die 1 "${CMD}: unknown sub-command -- ${subcommand}" fi