We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fc6d777 + 3c0d09e commit ee9ac15Copy full SHA for ee9ac15
news/10588.feature.rst
@@ -0,0 +1 @@
1
+Documents the ``--require-virtualenv`` flag for ``pip install``.
src/pip/_internal/cli/cmdoptions.py
@@ -177,13 +177,15 @@ class PipOption(Option):
177
178
require_virtualenv: Callable[..., Option] = partial(
179
Option,
180
- # Run only if inside a virtualenv, bail if not.
181
"--require-virtualenv",
182
"--require-venv",
183
dest="require_venv",
184
action="store_true",
185
default=False,
186
- help=SUPPRESS_HELP,
+ help=(
+ "Allow pip to only run in a virtual environment; "
187
+ "exit with an error otherwise."
188
+ ),
189
)
190
191
verbose: Callable[..., Option] = partial(
0 commit comments