Use fancy mode for pwsh on *nix

This commit is contained in:
Samuel Carswell
2024-03-08 15:54:55 +11:00
parent 442116a9a7
commit 67bc43902c
+6 -2
View File
@@ -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,