Skip to content

Commit

Permalink
Merge pull request #10588 from tusharsadhwani/main
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr authored Oct 18, 2021
2 parents fc6d777 + 3c0d09e commit ee9ac15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions news/10588.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Documents the ``--require-virtualenv`` flag for ``pip install``.
6 changes: 4 additions & 2 deletions src/pip/_internal/cli/cmdoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,15 @@ class PipOption(Option):

require_virtualenv: Callable[..., Option] = partial(
Option,
# Run only if inside a virtualenv, bail if not.
"--require-virtualenv",
"--require-venv",
dest="require_venv",
action="store_true",
default=False,
help=SUPPRESS_HELP,
help=(
"Allow pip to only run in a virtual environment; "
"exit with an error otherwise."
),
)

verbose: Callable[..., Option] = partial(
Expand Down

0 comments on commit ee9ac15

Please sign in to comment.