Fix kitty_exe() being executed when the script doesn't have shebang

This commit is contained in:
pagedown 2022-02-05 20:18:40 +08:00
parent 3dfdb3ac89
commit b47711e23a
No known key found for this signature in database
GPG key ID: E921CF18AC8FF6EB

View file

@ -389,7 +389,7 @@ def launch_child(
line = f.read(4096).splitlines()[0]
cmd += shlex.split(line) + [old_exe]
else:
cmd += [resolved_shell(get_options())[0], cmd[0]]
cmd += [resolved_shell(get_options())[0], old_exe]
if cmd_rest:
cmd += cmd_rest
fenv: Dict[str, str] = {}