Fix: get PWD from xonsh shell env instead of the os env

fixes #238
This commit is contained in:
eugenesvk 2021-07-22 18:43:49 +07:00
parent d74cd962f0
commit 780d05ceb1
1 changed files with 2 additions and 2 deletions

View File

@ -37,9 +37,9 @@ def __zoxide_pwd() -> str:
{%- if resolve_symlinks %}
pwd = os.getcwd()
{%- else %}
pwd = os.getenv("PWD")
pwd = __xonsh__.env.get("PWD")
if pwd is None:
raise Exception("$PWD not found in env")
raise Exception("$PWD not found in Xonsh env")
{%- endif %}
return pwd