modulefile: bugfix in modifying PATH

(cherry picked from commit d25663a32e)
This commit is contained in:
2021-05-06 07:27:28 +00:00
committed by gsell
parent fcf37f8b44
commit 2faf42a4e0
+3 -1
View File
@@ -17,6 +17,8 @@ Pmodules are a hierarchical module environment based on Environment Modules.
if { [module-info mode load] } {
set PATH ":$::env(PATH):"
if { [regexp -- {.*:(.*/Pmodules/[^:]*):} $PATH -> str] } {
remove-path PATH $str
if { [string compare $str $PREFIX/bin] != 0 } {
remove-path PATH $str
}
}
}