Index: gclient.py |
diff --git a/gclient.py b/gclient.py |
index e2491cef1d39b1a80e6c6fcb3ae25fab676696bc..12d1f0f670ac1ddeca34c70fb8a53ad582d4e334 100755 |
--- a/gclient.py |
+++ b/gclient.py |
@@ -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): |