Pmodules/modulecmd.bash.in: fixing #26

This commit is contained in:
2017-11-15 18:00:52 +01:00
parent 453a9c92a1
commit f3b1291ef2
+12 -3
View File
@@ -1930,13 +1930,22 @@ while (( $# > 0 )); do
opts+=( "$1" )
;;
* )
subcommand="$1"
if [[ -z "${Subcommands[$1]}" ]]; then
std::die 1 "${CMD}: unknown sub-command -- $1"
fi
subcommand="$1"
shift
opts+=( "$@" )
shift $#
;;
esac
shift
done
while (( $# > 0 )); do
case "$1" in
-- )
;;
* )
opts+=( "$1" )
;;
esac
shift