Commit 2d3c28d5 authored by rnk@chromium.org's avatar rnk@chromium.org

Don't put unicode strings into the environment

This fixes 'gclient recurse ...' on Windows.

R=dpranke@chromium.org

Review URL: https://codereview.chromium.org/167443002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@260405 0039d316-1c4b-4281-b951-d872f2087c98
parent 0752f9bf
......@@ -703,13 +703,14 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
scm = gclient_scm.GetScmName(parsed_url)
if not options.scm or scm in options.scm:
cwd = os.path.normpath(os.path.join(self.root.root_dir, self.name))
# Pass in the SCM type as an env variable
# Pass in the SCM type as an env variable. Make sure we don't put
# unicode strings in the environment.
env = os.environ.copy()
if scm:
env['GCLIENT_SCM'] = scm
env['GCLIENT_SCM'] = str(scm)
if parsed_url:
env['GCLIENT_URL'] = parsed_url
env['GCLIENT_DEP_PATH'] = self.name
env['GCLIENT_URL'] = str(parsed_url)
env['GCLIENT_DEP_PATH'] = str(self.name)
if options.prepend_dir and scm == 'git':
print_stdout = False
def filter_fn(line):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment