Skip to content

Commit 8a87f02

Browse files
committed
Improve error message in tidy
1 parent c290e9d commit 8a87f02

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/tools/tidy/src/ext_tool_checks.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,10 @@ fn create_venv_at_path(path: &Path) -> Result<(), Error> {
267267

268268
let stderr = String::from_utf8_lossy(&out.stderr);
269269
let err = if stderr.contains("No module named virtualenv") {
270-
Error::Generic(
270+
Error::Generic(format!(
271271
"virtualenv not found: you may need to install it \
272-
(`python3 -m pip install venv`)"
273-
.to_owned(),
274-
)
272+
(`{sys_py} -m pip install virtualenv`)"
273+
))
275274
} else {
276275
Error::Generic(format!(
277276
"failed to create venv at '{}' using {sys_py}: {stderr}",

0 commit comments

Comments
 (0)