Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fancy mode for pwsh on *nix (draft) #6108

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pipenv/cli/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,12 @@ def shell(state, fancy=False, shell_args=None, anyway=False, quiet=False):
sys.exit(1)
# Load .env file.
load_dot_env(state.project)
# Use fancy mode for Windows.
if os.name == "nt":
# Use fancy mode for Windows or pwsh on *nix.
if (
os.name == "nt"
or os.environ["PIPENV_SHELL"].split(os.path.sep)[-1] == "pwsh"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if these lookups from os.environ should actually be gets in case they are not defined?

or os.environ["SHELL"].split(os.path.sep)[-1] == "pwsh"
):
fancy = True
do_shell(
state.project,
Expand Down
Loading