From 8e963f10ef09e3197be1cc926a052f1860157f7e Mon Sep 17 00:00:00 2001 From: Heilig Benedek Date: Fri, 7 Sep 2018 01:49:43 +0200 Subject: [PATCH] fix: add shell = True to make clang-format work on Windows (#14121) --- script/run-clang-format.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/run-clang-format.py b/script/run-clang-format.py index 010f094c9a4..a14d5693847 100644 --- a/script/run-clang-format.py +++ b/script/run-clang-format.py @@ -110,7 +110,8 @@ def run_clang_format_diff(args, file_name): invocation, stdout=subprocess.PIPE, stderr=subprocess.PIPE, - universal_newlines=True) + universal_newlines=True, + shell = True) except OSError as exc: raise DiffError(str(exc)) proc_stdout = proc.stdout @@ -254,7 +255,8 @@ def main(): popen = subprocess.Popen( ["git", "diff", "--name-only", "--cached"], stdout=subprocess.PIPE, - stderr=subprocess.STDOUT + stderr=subprocess.STDOUT, + shell = True ) for line in popen.stdout: file_name = line.rstrip()