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

Unified Diff: git_cl.py

Issue 1917863009: Subprocess uses shell=True on Windows when launching GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fix nits Created 4 years, 8 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: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index fd2dcea4189f99632da41dafc2874c857f599091..9bf60ea29f60e404dc7465255c80b84159deae58 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -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)
« 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