Skip to content

Commit 67bc439

Browse files
committed
Use fancy mode for pwsh on *nix
1 parent 442116a commit 67bc439

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pipenv/cli/command.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,12 @@ def shell(state, fancy=False, shell_args=None, anyway=False, quiet=False):
388388
sys.exit(1)
389389
# Load .env file.
390390
load_dot_env(state.project)
391-
# Use fancy mode for Windows.
392-
if os.name == "nt":
391+
# Use fancy mode for Windows or pwsh on *nix.
392+
if (
393+
os.name == "nt"
394+
or os.environ["PIPENV_SHELL"].split(os.path.sep)[-1] == "pwsh"
395+
or os.environ["SHELL"].split(os.path.sep)[-1] == "pwsh"
396+
):
393397
fancy = True
394398
do_shell(
395399
state.project,

0 commit comments

Comments
 (0)