From 926289a375a9eb8946dc7eb62a312e40d67d7662 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 12 Jul 2024 14:11:19 +0200 Subject: [PATCH] modulecmd: treat unset variables as error and pipefail set --- Pmodules/modulecmd.bash.in | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 8c1d19f..a8d5310 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1,18 +1,13 @@ #!@BASH@ --noprofile # -# -# which information do we need for overlays? -# - list of used overlays by name -# - dict to map an overlay name to install_root -# - dict to map an overlay name to modulefile_root -# - dict to map an overlay name to the overlay type -# - dict to map moduledirs to overlay name - unset CDPATH # unset CDPATH, otherwise 'cd' prints the directoy! unset IFS # use default IFS shopt -s nullglob +#set -e # exit on error +set -u # Treat unset variables as an error +set -o pipefail # used in some output messages only declare -r CMD='module'