mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Ensure pw file is cleaned up on kitten exit
This way it is cleaned up even if ssh fails
This commit is contained in:
parent
2404eba11f
commit
6e4d3c98da
1 changed files with 4 additions and 1 deletions
|
|
@ -427,7 +427,10 @@ def main(args: List[str]) -> NoReturn:
|
|||
so = init_config(overrides)
|
||||
sod = {k: v._asdict() for k, v in so.items()}
|
||||
cmd += get_remote_command(remote_args, hostname, options_for_host(hostname_for_match, uname, so).interpreter, sod)
|
||||
os.execvp('ssh', cmd)
|
||||
import subprocess
|
||||
with suppress(FileNotFoundError):
|
||||
raise SystemExit(subprocess.run(cmd).returncode)
|
||||
raise SystemExit('Could not find the ssh executable, is it in your PATH')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue