Skip to content

Commit b59cf5d

Browse files
committed
Also pass --no-input when pip is installed in the target env
1 parent 52e3ee7 commit b59cf5d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pip_deepfreeze/sanity.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,19 @@ def get_pip_version(python: str) -> Version:
4949

5050
@lru_cache
5151
def get_pip_command(python: str) -> Tuple[str, ...]:
52+
pip_options = ("--no-input",)
5253
env_pip_version = _get_env_info(python).get("pip_version")
5354
if env_pip_version:
5455
# pip is installed in the target environment, let's use it
55-
return (python, "-m", "pip")
56+
return (python, "-m", "pip", *pip_options)
5657
if not local_pip_compatible(python):
5758
log_error(
5859
f"pip is not available to {python}, and the pip version. "
5960
f"installed the pip-deepfreeze environment is not compatible with it. "
6061
f"Please install pip in the target environment."
6162
)
6263
raise typer.Exit(1)
63-
return (sys.executable, "-m", "pip", "--python", python, "--no-input")
64+
return (sys.executable, "-m", "pip", "--python", python, *pip_options)
6465

6566

6667
@lru_cache

0 commit comments

Comments
 (0)