Correctly getting env vars in pipenv.cli.command.shell

This commit is contained in:
Samuel Carswell
2024-03-22 11:26:51 +11:00
parent 67bc43902c
commit cecc7d02f2
+2 -2
View File
@@ -391,8 +391,8 @@ def shell(state, fancy=False, shell_args=None, anyway=False, quiet=False):
# Use fancy mode for Windows or pwsh on *nix.
if (
os.name == "nt"
or os.environ["PIPENV_SHELL"].split(os.path.sep)[-1] == "pwsh"
or os.environ["SHELL"].split(os.path.sep)[-1] == "pwsh"
or (os.environ.get("PIPENV_SHELL") or "").split(os.path.sep)[-1] == "pwsh"
or (os.environ.get("SHELL") or "").split(os.path.sep)[-1] == "pwsh"
):
fancy = True
do_shell(