From b18b86c2c672c8354bf601763e5a42005a72510a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20S=C3=A5gfors?= Date: Tue, 1 Dec 2015 20:20:26 +0200 Subject: [PATCH] Get USER & SHELL from environ instead of as $ vars For some reason, $USER did not seem to be properly set on OSX 10.10 --- FixPath.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FixPath.py b/FixPath.py index e338598..79c4db6 100644 --- a/FixPath.py +++ b/FixPath.py @@ -17,7 +17,7 @@ def isMac(): originalEnv = {} def getSysPath(): - command = "TERM=ansi CLICOLOR=\"\" SUBLIME=1 /usr/bin/login -fqpl $USER $SHELL -l -c 'TERM=ansi CLICOLOR=\"\" SUBLIME=1 printf \"%s\" \"$PATH\"'" + command = "TERM=ansi CLICOLOR=\"\" SUBLIME=1 /usr/bin/login -fqpl " + environ['USER'] + " " + environ['SHELL'] + " -l -c 'TERM=ansi CLICOLOR=\"\" SUBLIME=1 printf \"%s\" \"$PATH\"'" # Execute command with original environ. Otherwise, our changes to the PATH propogate down to # the shell we spawn, which re-adds the system path & returns it, leading to duplicate values.