From cfdd5396a94239d4b1889224f03f879c56839038 Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Sun, 14 Jul 2024 00:00:56 +0200 Subject: [PATCH 1/2] Fix: dont call load dot env in shell sub command dot env is always globally loaded. Fix #6198 --- pipenv/cli/command.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pipenv/cli/command.py b/pipenv/cli/command.py index 8874a6f32..a7c65f4f0 100644 --- a/pipenv/cli/command.py +++ b/pipenv/cli/command.py @@ -390,8 +390,7 @@ def shell(state, fancy=False, shell_args=None, anyway=False, quiet=False): "New shell not activated to avoid nested environments." ) sys.exit(1) - # Load .env file. - load_dot_env(state.project) + # Use fancy mode for Windows or pwsh on *nix. if ( os.name == "nt" From 1ed3c4d9fc8cd65dc6cce70a566451e40be5aa0b Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Sun, 14 Jul 2024 00:03:53 +0200 Subject: [PATCH 2/2] add news snippet --- news/6202.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/6202.bugfix.rst diff --git a/news/6202.bugfix.rst b/news/6202.bugfix.rst new file mode 100644 index 000000000..92f107be4 --- /dev/null +++ b/news/6202.bugfix.rst @@ -0,0 +1 @@ +Fix loading dot env twice #6198