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

Unified Diff: command_wrapper.py

Issue 8597020: Ensure that all args with spaces in them remain quoted when used with command_wrapper.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/command_wrapper/bin/
Patch Set: Created 9 years, 1 month 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: command_wrapper.py
===================================================================
--- command_wrapper.py (revision 109830)
+++ command_wrapper.py (working copy)
@@ -95,8 +95,15 @@
socket.setdefaulttimeout(10)
command_id = uuid.uuid1()
- cmd = ' '.join(args)
+ # Ensure that args with spaces in them remain quoted.
+ args_quoted = []
bradn 2011/11/19 01:09:13 Why not just requote it all?
+ for arg in args:
+ if ' ' in arg:
+ arg = '"' + arg + '"'
+ args_quoted.append(arg)
+ cmd = ' '.join(args_quoted)
+
# Log that we're even starting.
RunWithTimeout(LOG_TIMEOUT, LogCommand,
options, command_id, -1, cmd, -1, '', '', 0)
« 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