Commit 627d9002 authored by bsep@chromium.org's avatar bsep@chromium.org

Subprocess uses shell=True on Windows when launching GN.

BUG=600051

Review-Url: https://codereview.chromium.org/1917863009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300311 0039d316-1c4b-4281-b951-d872f2087c98
parent ddbc4037
......@@ -95,9 +95,9 @@ def GetNoGitPagerEnv():
return env
def RunCommand(args, error_ok=False, error_message=None, **kwargs):
def RunCommand(args, error_ok=False, error_message=None, shell=False, **kwargs):
try:
return subprocess2.check_output(args, shell=False, **kwargs)
return subprocess2.check_output(args, shell=shell, **kwargs)
except subprocess2.CalledProcessError as e:
logging.debug('Failed running %s', args)
if not error_ok:
......@@ -4748,7 +4748,9 @@ def CMDformat(parser, args):
if not opts.dry_run and not opts.diff:
cmd.append('--in-place')
for gn_diff_file in gn_diff_files:
stdout = RunCommand(cmd + [gn_diff_file], cwd=top_dir)
stdout = RunCommand(cmd + [gn_diff_file],
shell=sys.platform == 'win32',
cwd=top_dir)
if opts.diff:
sys.stdout.write(stdout)
......
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