mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-24 06:04:08 +00:00
ssh kitten: Fix kitten not being on PATH when sshing into Debian systems
Fixes #7160
This commit is contained in:
parent
dd249df5eb
commit
9d027e4fbd
6 changed files with 28 additions and 2 deletions
|
|
@ -177,10 +177,11 @@ fi' > "$sh_script"
|
|||
}
|
||||
|
||||
install_kitty_bootstrap() {
|
||||
kitty_dir="$data_dir/kitty/bin"
|
||||
export SSH_KITTEN_KITTY_DIR="$kitty_dir"
|
||||
kitty_exists="n"
|
||||
command -v kitty 2> /dev/null > /dev/null && kitty_exists="y"
|
||||
if [ "$kitty_remote" = "yes" -o "$kitty_remote-$kitty_exists" = "if-needed-n" ]; then
|
||||
kitty_dir="$data_dir/kitty/bin"
|
||||
if [ "$kitty_exists" = "y" ]; then
|
||||
export PATH="$kitty_dir:$PATH"
|
||||
else
|
||||
|
|
|
|||
|
|
@ -284,8 +284,9 @@ def exec_with_shell_integration():
|
|||
def install_kitty_bootstrap():
|
||||
kitty_remote = os.environ.pop('KITTY_REMOTE', '')
|
||||
kitty_exists = shutil.which('kitty')
|
||||
kitty_dir = os.path.join(data_dir, 'kitty', 'bin')
|
||||
os.environ['SSH_KITTEN_KITTY_DIR'] = kitty_dir
|
||||
if kitty_remote == 'yes' or (kitty_remote == 'if-needed' and not kitty_exists):
|
||||
kitty_dir = os.path.join(data_dir, 'kitty', 'bin')
|
||||
if kitty_exists:
|
||||
os.environ['PATH'] = kitty_dir + os.pathsep + os.environ['PATH']
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue