When running kitty from within kitty, use a full path

Fixes inability to run kitty from the shell when the users shell scripts
reset PATH. See #668
This commit is contained in:
Kovid Goyal
2018-06-22 15:33:07 +05:30
parent 82f6fbff77
commit aba84581f5
4 changed files with 25 additions and 14 deletions

View File

@@ -5,7 +5,7 @@
import shlex
from .config_data import to_layout_names
from .constants import shell_path
from .constants import shell_path, kitty_exe
from .layout import all_layouts
from .utils import log_error
@@ -125,7 +125,7 @@ def create_session(opts, args=None, special_window=None, cwd_from=None, respect_
if special_window is None:
cmd = args.args if args and args.args else resolved_shell(opts)
if args.hold:
cmd = ['kitty', '+hold'] + cmd
cmd = [kitty_exe(), '+hold'] + cmd
from kitty.tabs import SpecialWindow
k = {'cwd_from': cwd_from}
if respect_cwd: