modulecmd: create a tmpdile for sub-cmd switch

This commit is contained in:
2021-05-11 14:05:19 +02:00
parent adcfbd5401
commit 69bcb98a07
+1 -1
View File
@@ -2283,7 +2283,7 @@ if (( ${#GroupDepths[@]} == 0 )); then
fi
case ${subcommand} in
load|purge|search )
load|purge|search|switch )
declare -r tmpfile=$( ${mktemp} /tmp/Pmodules.XXXXXX ) \
|| std::die 1 "Oops: unable to create tmp file!"
;;