Failure to change to cwd should not be fatal in bootstrap.py to match bootstrap.sh

This commit is contained in:
Kovid Goyal 2023-11-20 19:35:41 +05:30
parent 6d49686aee
commit ef9dada80d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -295,7 +295,10 @@ def main():
cwd = os.environ.pop('KITTY_LOGIN_CWD', '')
install_kitty_bootstrap()
if cwd:
try:
os.chdir(cwd)
except Exception as err:
print(f'Failed to change working directory to: {cwd} with error: {err}', file=sys.stderr)
ksi = frozenset(filter(None, os.environ.get('KITTY_SHELL_INTEGRATION', '').split()))
exec_cmd = b'EXEC_CMD'
if exec_cmd: