From 9e3b4c8237fd7d074b257709d3f4b20bbd9feb82 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 2 May 2024 15:50:52 +0200 Subject: [PATCH] modulecmd: bugfix in sub-cmd 'unuse' if argument is a directory --- Pmodules/modulecmd.bash.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 3a52f41..baf82db 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1864,7 +1864,7 @@ subcommand_unuse() { if is_release_stage "${arg}"; then # argument is release stage std::remove_path UsedReleaseStages "${arg}" - return + return 0 fi if [[ -v OverlayInfo[${arg}:type] ]]; then unuse_overlay "${arg}" @@ -1873,10 +1873,11 @@ subcommand_unuse() { if [[ -d ${arg} ]]; then local dir=$(std::get_abspath "${arg}") std::remove_path MODULEPATH "${dir}" + return 0 fi if [[ -n ${GroupDepths[${arg}]} ]]; then unuse_group "${arg}" - return + return 0 fi std::die 3 "%s %s: %s -- %s" \