Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index fd2dcea4189f99632da41dafc2874c857f599091..26781eb9ba57856aee5e701bbcfbd40f15eb9067 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], |
+ cwd=top_dir, |
scottmg
2016/04/28 23:49:43
Swap the order of cwd= and shell=, since shell= is
Bret
2016/04/28 23:57:16
Done.
|
+ shell=(sys.platform == 'win32')) |
scottmg
2016/04/28 23:49:43
nit; I would remove the parens around (sys.platfor
Bret
2016/04/28 23:57:16
Done.
|
if opts.diff: |
sys.stdout.write(stdout) |