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.