Commit b7db183f authored by Edward Lesmes's avatar Edward Lesmes Committed by LUCI CQ

git-cl: Use shell=True when running yapf using vpython on Windows.

Bug: 1097215
Change-Id: Ibdae2d84a661442e6dcaa54e975bb5f1009cce83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2254740Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent 1e781423
......@@ -4055,9 +4055,9 @@ def CMDupload(parser, args):
(options, args) = parser.parse_args(args)
if options.git_completion_helper:
print(' '.join(opt.get_opt_string() for opt in parser.option_list
if opt.help != optparse.SUPPRESS_HELP))
return
print(' '.join(opt.get_opt_string() for opt in parser.option_list
if opt.help != optparse.SUPPRESS_HELP))
return
if git_common.is_dirty_git_tree('upload'):
return 1
......@@ -4954,14 +4954,17 @@ def CMDformat(parser, args):
if opts.diff or opts.dry_run:
cmd += ['--diff']
# Will return non-zero exit code if non-empty diff.
stdout = RunCommand(cmd, error_ok=True, cwd=top_dir)
stdout = RunCommand(cmd,
error_ok=True,
cwd=top_dir,
shell=sys.platform.startswith('win32'))
if opts.diff:
sys.stdout.write(stdout)
elif len(stdout) > 0:
return_value = 2
else:
cmd += ['-i']
RunCommand(cmd, cwd=top_dir)
RunCommand(cmd, cwd=top_dir, shell=sys.platform.startswith('win32'))
# Format GN build files. Always run on full build files for canonical form.
if gn_diff_files:
......
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