fix: add shell = True to make clang-format work on Windows (#14121)
This commit is contained in:
parent
826af1d676
commit
8e963f10ef
1 changed files with 4 additions and 2 deletions
|
@ -110,7 +110,8 @@ def run_clang_format_diff(args, file_name):
|
||||||
invocation,
|
invocation,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE,
|
stderr=subprocess.PIPE,
|
||||||
universal_newlines=True)
|
universal_newlines=True,
|
||||||
|
shell = True)
|
||||||
except OSError as exc:
|
except OSError as exc:
|
||||||
raise DiffError(str(exc))
|
raise DiffError(str(exc))
|
||||||
proc_stdout = proc.stdout
|
proc_stdout = proc.stdout
|
||||||
|
@ -254,7 +255,8 @@ def main():
|
||||||
popen = subprocess.Popen(
|
popen = subprocess.Popen(
|
||||||
["git", "diff", "--name-only", "--cached"],
|
["git", "diff", "--name-only", "--cached"],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT
|
stderr=subprocess.STDOUT,
|
||||||
|
shell = True
|
||||||
)
|
)
|
||||||
for line in popen.stdout:
|
for line in popen.stdout:
|
||||||
file_name = line.rstrip()
|
file_name = line.rstrip()
|
||||||
|
|
Loading…
Reference in a new issue