Permalink
Browse files

Work around somewhat serious non-ascii char in env bug

  • Loading branch information...
1 parent 021b792 commit 70162725b0c994c7d66f4fc03191b99a3c311569 @bronson committed Nov 20, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 Packages/Default/exec.py
View
@@ -42,7 +42,9 @@ def __init__(self, arg_list, env, listener,
proc_env = os.environ.copy()
proc_env.update(env)
for k, v in proc_env.iteritems():
- proc_env[k] = os.path.expandvars(v).encode(sys.getfilesystemencoding())
+ # https://github.com/WhatWeDo/Sublime-Text-2-Compass-Build-System/issues/4#issuecomment-7891379
+ # proc_env[k] = os.path.expandvars(v).encode(sys.getfilesystemencoding())
+ proc_env[k] = os.path.expandvars(v.decode(sys.getfilesystemencoding())).encode(sys.getfilesystemencoding())
self.proc = subprocess.Popen(arg_list, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, startupinfo=startupinfo, env=proc_env, shell=shell)

0 comments on commit 7016272

Please sign in to comment.