This allows passing commands with quoted spaces, such as:
tools/test-wrapper-gypbuild.py --special-command \
"$DR/bin64/drrun -ops '-reset_every_nth_pending 0' @" \
...
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/
11143018
Patch from Reid Kleckner <rnk@google.com>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12744
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
else:
pos = value.find('@')
import urllib
- prefix = urllib.unquote(value[:pos]).split()
- suffix = urllib.unquote(value[pos+1:]).split()
+ import shlex
+ prefix = shlex.split(urllib.unquote(value[:pos]))
+ suffix = shlex.split(urllib.unquote(value[pos+1:]))
def ExpandCommand(args):
return prefix + args + suffix
return ExpandCommand