mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-07-05 13:20:50 +02:00
modulecmd: bugfix in un-using a group
This commit is contained in:
@@ -1962,7 +1962,7 @@ subcommand_unuse() {
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# remove additional directories added overlay
|
# remove additional directories added by overlay
|
||||||
if [[ -v OverlayInfo[${ol_name}:modulepath] && \
|
if [[ -v OverlayInfo[${ol_name}:modulepath] && \
|
||||||
-n "${OverlayInfo[${ol_name}:modulepath]}" ]]; then
|
-n "${OverlayInfo[${ol_name}:modulepath]}" ]]; then
|
||||||
local -a modulepath=()
|
local -a modulepath=()
|
||||||
@@ -1980,6 +1980,7 @@ subcommand_unuse() {
|
|||||||
for dir in "${modulepath[@]}"; do
|
for dir in "${modulepath[@]}"; do
|
||||||
[[ "${dir}" == "${OverlayInfo[${ol_name}:modulefiles_root]}" ]] && \
|
[[ "${dir}" == "${OverlayInfo[${ol_name}:modulefiles_root]}" ]] && \
|
||||||
std::remove_path MODULEPATH "${dir}"
|
std::remove_path MODULEPATH "${dir}"
|
||||||
|
|
||||||
done
|
done
|
||||||
export_env UsedOverlays
|
export_env UsedOverlays
|
||||||
EnvMustBeSaved='yes'
|
EnvMustBeSaved='yes'
|
||||||
@@ -2007,7 +2008,8 @@ subcommand_unuse() {
|
|||||||
std::remove_path UsedGroups "${arg}"
|
std::remove_path UsedGroups "${arg}"
|
||||||
local overlay
|
local overlay
|
||||||
for overlay in "${UsedOverlays[@]}"; do
|
for overlay in "${UsedOverlays[@]}"; do
|
||||||
local dir="${overlay}/${arg}/${PMODULES_MODULEFILES_DIR}"
|
local dir="${OverlayInfo[${overlay}:modulefiles_root]}"
|
||||||
|
dir+="/${arg}/${PMODULES_MODULEFILES_DIR}"
|
||||||
std::remove_path MODULEPATH "${dir}"
|
std::remove_path MODULEPATH "${dir}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user