mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 01:53:08 +02:00
update of PMODULES_ENV fixed in subcommand 'unload'
Not all cached data has been updated while unloading a module amangst other the list of used groups (UsedGroups)
This commit is contained in:
@@ -864,10 +864,30 @@ subcommand_unload() {
|
||||
# another module.
|
||||
# For the time being the modules requiring this module will be
|
||||
# unloaded too.
|
||||
local opts=()
|
||||
pmodules::get_options opts -- '' "$@" || subcommand_help_${subcommand}
|
||||
eval set -- "${opts[@]}"
|
||||
local args=()
|
||||
while (( $# > 0 )); do
|
||||
subcommand_generic1 unload "$1"
|
||||
case $1 in
|
||||
-- )
|
||||
;;
|
||||
* )
|
||||
args+=( "$1" )
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
if (( ${#args[@]} == 0 )); then
|
||||
std::die 3 "%s %s: missing argument\n" \
|
||||
"${CMD}" 'unload'
|
||||
fi
|
||||
|
||||
for arg in "${args[@]}"; do
|
||||
local output=$("${modulecmd}" "${g_shell}" "${subcommand}" "${arg}")
|
||||
echo "${output}"
|
||||
eval "${output}"
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user