Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: build/env_dump.py

Issue 24208002: Fix few errors in env_dump.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/env_dump.py
diff --git a/build/env_dump.py b/build/env_dump.py
index b84597c995be15c46cdf59801e00a77d7f08a8a4..d6a18c83224cf1d142c1b50b3135b6c056e9fdc4 100755
--- a/build/env_dump.py
+++ b/build/env_dump.py
@@ -9,6 +9,7 @@
import json
import optparse
import os
+import pipes
import subprocess
import sys
@@ -31,13 +32,15 @@ def main():
with open(options.output_json, 'w') as f:
json.dump(dict(os.environ), f)
else:
- envsetup_cmd = ' '.join(args)
+ envsetup_cmd = ' '.join(map(pipes.quote, args))
full_cmd = [
'bash', '-c',
- '. %s; ./%s -d -f %s' % (envsetup_cmd, __file__, options.output_json)]
+ '. %s; %s -d -f %s' % (envsetup_cmd, os.path.abspath(__file__),
+ options.output_json)
+ ]
ret = subprocess.call(full_cmd)
if ret:
- sys.exit('Error running %s and dumping env', envsetup_cmd)
+ sys.exit('Error running %s and dumping env' % envsetup_cmd)
if __name__ == '__main__':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698