Fix setting env vars in kssh cmdline that has no kitten directives

This commit is contained in:
Kovid Goyal
2025-08-22 20:56:41 +05:30
parent 7134819c26
commit 1a25ca1545

View File

@@ -156,7 +156,7 @@ def set_env_in_cmdline(env: dict[str, str], argv: list[str], clone: bool = True)
if clone:
patch_cmdline('clone_env', create_shared_memory(env, 'ksse-'), argv)
return
idx = argv.index('ssh')
idx = argv.index('ssh') - 1
for i in range(idx, len(argv)):
if argv[i] == '--kitten':
idx = i + 1