Skip to content

Commit ee9ac15

Browse files
authored
Merge pull request #10588 from tusharsadhwani/main
2 parents fc6d777 + 3c0d09e commit ee9ac15

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

news/10588.feature.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Documents the ``--require-virtualenv`` flag for ``pip install``.

src/pip/_internal/cli/cmdoptions.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,15 @@ class PipOption(Option):
177177

178178
require_virtualenv: Callable[..., Option] = partial(
179179
Option,
180-
# Run only if inside a virtualenv, bail if not.
181180
"--require-virtualenv",
182181
"--require-venv",
183182
dest="require_venv",
184183
action="store_true",
185184
default=False,
186-
help=SUPPRESS_HELP,
185+
help=(
186+
"Allow pip to only run in a virtual environment; "
187+
"exit with an error otherwise."
188+
),
187189
)
188190

189191
verbose: Callable[..., Option] = partial(

0 commit comments

Comments
 (0)