nixos-rebuild-ng: set capture_output=True to cleanup_ssh

This commit is contained in:
Thiago Kenji Okada 2024-12-01 13:54:53 +00:00
parent d704aae2cf
commit fb5178c3c5

View File

@ -71,8 +71,10 @@ class RunKwargs(TypedDict, total=False):
def cleanup_ssh() -> None:
"Close SSH ControlMaster connection."
for ctrl in TMPDIR_PATH.glob("ssh-*"):
subprocess.run(
["ssh", "-o", f"ControlPath={ctrl}", "-O", "exit", "dummyhost"], check=False
run_wrapper(
["ssh", "-o", f"ControlPath={ctrl}", "-O", "exit", "dummyhost"],
check=False,
capture_output=True,
)
TMPDIR.cleanup()