modulefile: bugfix in modifying PATH

This commit is contained in:
2021-05-06 09:27:28 +02:00
parent 9a0d55ed85
commit d25663a32e
+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
}
}
}