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

View File

@@ -389,7 +389,7 @@ class Tab: # {{{
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] = {}