From 276ed7263c15f5955ffc4c98f9f0b3faaba73602 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 29 Nov 2021 12:22:33 +0530 Subject: [PATCH] Forgot to use env rather than os.environ when checking for ZDOTDIR --- kitty/shell_integration.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kitty/shell_integration.py b/kitty/shell_integration.py index c9bce5549..5d96ed5ab 100644 --- a/kitty/shell_integration.py +++ b/kitty/shell_integration.py @@ -71,8 +71,8 @@ def setup_fish_env(env: Dict[str, str]) -> None: env['XDG_DATA_DIRS'] = os.pathsep.join(dirs) -def is_new_zsh_install() -> bool: - zdotdir = os.environ.get('ZDOTDIR') +def is_new_zsh_install(env: Dict[str, str]) -> bool: + zdotdir = env.get('ZDOTDIR') base = zdotdir or os.path.expanduser('~') for q in ('.zshrc', '.zshenv', '.zprofile', '.zlogin'): if os.path.exists(os.path.join(base, q)): @@ -81,9 +81,9 @@ def is_new_zsh_install() -> bool: def setup_zsh_env(env: Dict[str, str]) -> None: - zdotdir = os.environ.get('ZDOTDIR') + zdotdir = env.get('ZDOTDIR') base = zdotdir or os.path.expanduser('~') - if is_new_zsh_install(): + if is_new_zsh_install(env): # dont prevent zsh-newuser-install from running return if zdotdir is not None: