diff --git a/Pmodules/modulefile b/Pmodules/modulefile index 2a9311d..1893fdb 100644 --- a/Pmodules/modulefile +++ b/Pmodules/modulefile @@ -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 + } } }