Skip to content

Commit

Permalink
pip install --no-input everywhere (#6966)
Browse files Browse the repository at this point in the history
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 :)
  • Loading branch information
coobas committed Nov 11, 2022
1 parent def1ee8 commit 455c0b2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/poetry/inspection/info.py
Expand Up @@ -593,6 +593,7 @@ def get_pep517_metadata(path: Path) -> PackageInfo:
"install",
"--disable-pip-version-check",
"--ignore-installed",
"--no-input",
*PEP517_META_BUILD_DEPS,
)
venv.run(
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/installation/pip_installer.py
Expand Up @@ -46,7 +46,7 @@ def install(self, package: Package, update: bool = False) -> None:

return

args = ["install", "--no-deps"]
args = ["install", "--no-deps", "--no-input"]

if not package.is_direct_origin() and package.source_url:
assert package.source_reference is not None
Expand Down
1 change: 1 addition & 0 deletions src/poetry/utils/env.py
Expand Up @@ -1953,6 +1953,7 @@ def build_environment(
"install",
"--disable-pip-version-check",
"--ignore-installed",
"--no-input",
*poetry.pyproject.build_system.requires,
)

Expand Down
1 change: 1 addition & 0 deletions tests/utils/test_env.py
Expand Up @@ -1535,6 +1535,7 @@ def test_build_environment_called_build_script_specified(
"install",
"--disable-pip-version-check",
"--ignore-installed",
"--no-input",
*extended_without_setup_poetry.pyproject.build_system.requires,
]
]
Expand Down

0 comments on commit 455c0b2

Please sign in to comment.