From d25663a32e7d9f3453be59fb94bd971d72ea2b61 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 6 May 2021 09:27:28 +0200 Subject: [PATCH] modulefile: bugfix in modifying PATH --- Pmodules/modulefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 + } } }