Skip to content

Commit a33aed0

Browse files
committed
Improve docs for --root-user-action option
1 parent 99a82b7 commit a33aed0

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

news/514f0c13-84ee-4d81-8465-bae74e370d0b.trivial.rst

Whitespace-only changes.

src/pip/_internal/cli/cmdoptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,8 @@ def _handle_config_settings(
903903
dest="root_user_action",
904904
default="warn",
905905
choices=["warn", "ignore"],
906-
help="Action if pip is run as a root user. By default, a warning message is shown.",
906+
help="Action if pip is run as a root user ('warn' or 'ignore'). "
907+
"By default, a warning message is shown.",
907908
)
908909

909910

src/pip/_internal/cli/req_command.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ def warn_if_run_as_root() -> None:
221221
"Running pip as the 'root' user can result in broken permissions and "
222222
"conflicting behaviour with the system package manager. "
223223
"It is recommended to use a virtual environment instead: "
224-
"https://pip.pypa.io/warnings/venv"
224+
"https://pip.pypa.io/warnings/venv. "
225+
"Use the --root-user-action option if you know what you are doing and "
226+
"want to suppress this warning."
225227
)
226228

227229

0 commit comments

Comments
 (0)