From 314caffc080d97dbd1505b9406f30c3336b40a62 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Wed, 9 Nov 2011 16:41:44 +0000 Subject: [PATCH] safe against partially matching envVars. pythonPath and Path for instance... --- installation/setup_shellrc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installation/setup_shellrc.py b/installation/setup_shellrc.py index 964ab7742..f9a480d83 100755 --- a/installation/setup_shellrc.py +++ b/installation/setup_shellrc.py @@ -73,7 +73,7 @@ if theShell == 'bash': for line in content: for envVar,data in environment.items(): - m = re.search(r'^(.*?%s=)([^;]*)(.*)$'%envVar,line) + m = re.search(r'^(.*? %s=)([^;]*)(.*)$'%envVar,line) if m: substitute = eval(data['substitute'])+[path for path in m.group(2).split(':') if eval(data['delete']) not in path] line = m.group(1)+':'.join(substitute)+m.group(3)