Skip to content

Commit

Permalink
Use fancy mode for pwsh on *nix
Browse files Browse the repository at this point in the history
  • Loading branch information
samcarswell committed Mar 10, 2024
1 parent 442116a commit 67bc439
Showing 1 changed file with 6 additions and 2 deletions.
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"
or os.environ["SHELL"].split(os.path.sep)[-1] == "pwsh"
):
fancy = True
do_shell(
state.project,
Expand Down

0 comments on commit 67bc439

Please sign in to comment.