Skip to content

Commit 0a6662e

Browse files
authored
Merge pull request #12066 from Mr-Pepe/docs/improve-root-user-action-docs
2 parents 0807480 + 27042f9 commit 0a6662e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

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

Whitespace-only changes.

src/pip/_internal/cli/cmdoptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ 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, ignore] (default: warn)",
907907
)
908908

909909

src/pip/_internal/cli/req_command.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,12 @@ def warn_if_run_as_root() -> None:
219219

220220
logger.warning(
221221
"Running pip as the 'root' user can result in broken permissions and "
222-
"conflicting behaviour with the system package manager. "
222+
"conflicting behaviour with the system package manager, possibly "
223+
"rendering your system unusable."
223224
"It is recommended to use a virtual environment instead: "
224-
"https://pip.pypa.io/warnings/venv"
225+
"https://pip.pypa.io/warnings/venv. "
226+
"Use the --root-user-action option if you know what you are doing and "
227+
"want to suppress this warning."
225228
)
226229

227230

0 commit comments

Comments
 (0)