codeformat: Run sed only on requested files
When running from pre-commit, we believe the different invocations of sed were racing with each other, sometimes leaving zero-byte files in the filesystem (ow)
This commit is contained in:
parent
ed61e8955d
commit
0403a2cca5
|
@ -167,10 +167,7 @@ def main():
|
||||||
for file in lang_files(C_EXTS):
|
for file in lang_files(C_EXTS):
|
||||||
fixup_c(file)
|
fixup_c(file)
|
||||||
# Revert "// |" back to "//|"
|
# Revert "// |" back to "//|"
|
||||||
subprocess.call(
|
batch(["sed", "-i", "s,^// |,//|,"], lang_files(C_EXTS))
|
||||||
"find shared-bindings ports/*/bindings -name '*.c' -exec sed -i 's/\/ |/\/|/' {} \;",
|
|
||||||
shell=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Format Python files with black.
|
# Format Python files with black.
|
||||||
if format_py:
|
if format_py:
|
||||||
|
|
Loading…
Reference in New Issue