diff --git a/shell-integration/ssh/bootstrap.py b/shell-integration/ssh/bootstrap.py index 2d5e66a8e..ea902a7c2 100644 --- a/shell-integration/ssh/bootstrap.py +++ b/shell-integration/ssh/bootstrap.py @@ -214,16 +214,16 @@ def get_data(): tf.extractall(tdir) with open(tdir + '/data.sh') as f: env_vars = f.read() - apply_env_vars(env_vars) - data_dir = os.environ.pop('KITTY_SSH_KITTEN_DATA_DIR') - if not os.path.isabs(data_dir): - data_dir = os.path.join(HOME, data_dir) - data_dir = os.path.abspath(data_dir) - shell_integration_dir = os.path.join(data_dir, 'shell-integration') - compile_terminfo(tdir + '/home') - move(tdir + '/home', HOME) - if os.path.exists(tdir + '/root'): - move(tdir + '/root', '/') + apply_env_vars(env_vars) + data_dir = os.environ.pop('KITTY_SSH_KITTEN_DATA_DIR') + if not os.path.isabs(data_dir): + data_dir = os.path.join(HOME, data_dir) + data_dir = os.path.abspath(data_dir) + shell_integration_dir = os.path.join(data_dir, 'shell-integration') + compile_terminfo(tdir + '/home') + move(tdir + '/home', HOME) + if os.path.exists(tdir + '/root'): + move(tdir + '/root', '/') def exec_zsh_with_integration():