Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 722f20c

Browse files
authored
Unrolled build for rust-lang#126960
Rollup merge of rust-lang#126960 - Kobzol:tidy-venv-message, r=tgross35 Improve error message in tidy The old error message was wrong (there is no `venv` Python package on PyPi), and we did not specify the correct Python path in the error message.
2 parents bf750f5 + 8a87f02 commit 722f20c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/tools/tidy/src/ext_tool_checks.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,10 @@ fn create_venv_at_path(path: &Path) -> Result<(), Error> {
364364

365365
let stderr = String::from_utf8_lossy(&out.stderr);
366366
let err = if stderr.contains("No module named virtualenv") {
367-
Error::Generic(
367+
Error::Generic(format!(
368368
"virtualenv not found: you may need to install it \
369-
(`python3 -m pip install venv`)"
370-
.to_owned(),
371-
)
369+
(`{sys_py} -m pip install virtualenv`)"
370+
))
372371
} else {
373372
Error::Generic(format!(
374373
"failed to create venv at '{}' using {sys_py}: {stderr}",

0 commit comments

Comments
 (0)