Skip to content

Commit

Permalink
add --no-input to environment pip installs
Browse files Browse the repository at this point in the history
closes pypa#1802
  • Loading branch information
djcopley committed Nov 11, 2024
1 parent c1a3c6b commit e7b183d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/src/hatchling/metadata/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def project_metadata_from_core_metadata(core_metadata: str) -> dict[str, Any]:
left, _, right = marker
if left.value == 'extra':
extra = right.value
del markers[i] # noqa: B909
del markers[i]
# If there was only one marker then there will be an unnecessary
# trailing semicolon in the string representation
if not markers:
Expand Down
11 changes: 10 additions & 1 deletion src/hatch/env/plugin/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,16 @@ def construct_pip_install_command(self, args: list[str]):
A convenience method for constructing a [`pip install`](https://pip.pypa.io/en/stable/cli/pip_install/)
command with the given verbosity. The default verbosity is set to one less than Hatch's verbosity.
"""
command = ['python', '-u', '-m', 'pip', 'install', '--disable-pip-version-check', '--no-python-version-warning']
command = [
'python',
'-u',
'-m',
'pip',
'install',
'--disable-pip-version-check',
'--no-python-version-warning',
'--no-input',
]

# Default to -1 verbosity
add_verbosity_flag(command, self.verbosity, adjustment=-1)
Expand Down

0 comments on commit e7b183d

Please sign in to comment.