1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 10:52:19 +01:00

Optimize subprocess performance with close_fds=False (#10145)

This commit is contained in:
J. Nick Koston
2025-08-10 16:14:13 -05:00
committed by GitHub
parent 279f56141e
commit 5a8f722316
12 changed files with 40 additions and 13 deletions

View File

@@ -90,7 +90,7 @@ def main():
def run_command(*cmd, ignore_error: bool = False):
print(f"$ {shlex.join(list(cmd))}")
if not args.dry_run:
rc = subprocess.call(list(cmd))
rc = subprocess.call(list(cmd), close_fds=False)
if rc != 0 and not ignore_error:
print("Command failed")
sys.exit(1)