Dont require kitten to be in PATH when opening at cwd

This commit is contained in:
Kovid Goyal 2023-07-10 18:02:09 +05:30
parent e2b5c6688d
commit d2bdfbee9d
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -38,6 +38,7 @@
appname,
clear_handled_signals,
config_dir,
kitten_exe,
wakeup_io_loop,
)
from .fast_data_types import (
@ -155,6 +156,8 @@ def modify_argv_for_launch_with_cwd(self, argv: List[str]) -> str:
server_args = [] if run_shell else list(argv)
from kittens.ssh.utils import set_cwd_in_cmdline, set_server_args_in_cmdline
argv[:] = ssh_kitten_cmdline
if argv and argv[0] == 'kitten':
argv[0] = kitten_exe()
set_cwd_in_cmdline(reported_cwd, argv)
set_server_args_in_cmdline(server_args, argv, allocate_tty=not run_shell)
return ''