Skip to content

Commit

Permalink
Merge pull request #6108 from samcarswell/pwsh-unix
Browse files Browse the repository at this point in the history
Use fancy mode for pwsh on *nix (draft)
  • Loading branch information
matteius authored Mar 27, 2024
2 parents d78232d + cecc7d0 commit 70d2d28
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 @@ -391,8 +391,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.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(
state.project,
Expand Down

0 comments on commit 70d2d28

Please sign in to comment.