Merge branch '296-modulecmd-do-not-set-u-for-now' into 'master'

Resolve "modulecmd: do not set -u for now"

Closes #296

See merge request Pmodules/src!274
This commit is contained in:
2024-07-16 11:11:40 +02:00
+2 -2
View File
@@ -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