about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <jakub.beranek@vsb.cz>2024-06-25 20:46:13 +0200
committerJakub Beránek <jakub.beranek@vsb.cz>2024-06-25 20:46:13 +0200
commit8a87f02138ad4dae9a57d71635f9be2bf5696202 (patch)
treec86ebde8a0983cc612819803b1db99c528223fce
parentc290e9de32e8ba6a673ef125fde40eadd395d170 (diff)
downloadrust-8a87f02138ad4dae9a57d71635f9be2bf5696202.tar.gz
rust-8a87f02138ad4dae9a57d71635f9be2bf5696202.zip
Improve error message in tidy
-rw-r--r--src/tools/tidy/src/ext_tool_checks.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/tidy/src/ext_tool_checks.rs b/src/tools/tidy/src/ext_tool_checks.rs
index 995ad58cb62..26af51bd2d7 100644
--- a/src/tools/tidy/src/ext_tool_checks.rs
+++ b/src/tools/tidy/src/ext_tool_checks.rs
@@ -267,11 +267,10 @@ fn create_venv_at_path(path: &Path) -> Result<(), Error> {
 
     let stderr = String::from_utf8_lossy(&out.stderr);
     let err = if stderr.contains("No module named virtualenv") {
-        Error::Generic(
+        Error::Generic(format!(
             "virtualenv not found: you may need to install it \
-                               (`python3 -m pip install venv`)"
-                .to_owned(),
-        )
+                               (`{sys_py} -m pip install virtualenv`)"
+        ))
     } else {
         Error::Generic(format!(
             "failed to create venv at '{}' using {sys_py}: {stderr}",