Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/hatch/cli/shell/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from __future__ import annotations

import os
from typing import TYPE_CHECKING

import click

from hatch.config.constants import AppEnvVars

if TYPE_CHECKING:
from hatch.cli.application import Application

Expand Down Expand Up @@ -42,7 +45,7 @@ def shell(app: Application, env_name: str | None, name: str, path: str): # no c

with app.project.ensure_cwd():
environment = app.project.get_environment(chosen_env)
app.project.prepare_environment(environment)
app.project.prepare_environment(environment, keep_env=bool(os.environ.get(AppEnvVars.KEEP_ENV)))

first_run_indicator = app.cache_dir / "shell" / "first_run"
if not first_run_indicator.is_file():
Expand Down
Loading