1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 03:42:20 +01:00

Optimize subprocess performance with close_fds=False

This commit is contained in:
J. Nick Koston
2025-08-08 16:18:04 -05:00
parent ff9ddb9d68
commit 3ded96bb26
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)