Skip to content

Commit 455c0b2

Browse files
authored
pip install --no-input everywhere (#6966)
This is an extension of #6724. I think `pip install` invoked by poetry should never ask for user input. Motivation is that it happened to myself and a number of colleagues many times that poetry got seemingly stuck while it was just waiting for a user input because of a private pypi repository that needed authentication. I hope this is a valuable contribution to a tool I like a lot and would like to use more and more :)
1 parent def1ee8 commit 455c0b2

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

src/poetry/inspection/info.py

+1
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,7 @@ def get_pep517_metadata(path: Path) -> PackageInfo:
593593
"install",
594594
"--disable-pip-version-check",
595595
"--ignore-installed",
596+
"--no-input",
596597
*PEP517_META_BUILD_DEPS,
597598
)
598599
venv.run(

src/poetry/installation/pip_installer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def install(self, package: Package, update: bool = False) -> None:
4646

4747
return
4848

49-
args = ["install", "--no-deps"]
49+
args = ["install", "--no-deps", "--no-input"]
5050

5151
if not package.is_direct_origin() and package.source_url:
5252
assert package.source_reference is not None

src/poetry/utils/env.py

+1
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,7 @@ def build_environment(
19531953
"install",
19541954
"--disable-pip-version-check",
19551955
"--ignore-installed",
1956+
"--no-input",
19561957
*poetry.pyproject.build_system.requires,
19571958
)
19581959

tests/utils/test_env.py

+1
Original file line numberDiff line numberDiff line change
@@ -1535,6 +1535,7 @@ def test_build_environment_called_build_script_specified(
15351535
"install",
15361536
"--disable-pip-version-check",
15371537
"--ignore-installed",
1538+
"--no-input",
15381539
*extended_without_setup_poetry.pyproject.build_system.requires,
15391540
]
15401541
]

0 commit comments

Comments
 (0)