diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-29 22:10:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-29 22:10:56 +0200 |
| commit | 6df68793f36234cffa9384e056c4575acef5cc27 (patch) | |
| tree | 38a365025582b393e0e22ac32da918bce12af7f0 | |
| parent | 5b90824433dcab5db1ceaa8c04d995a2b096f09b (diff) | |
| parent | 8a87f02138ad4dae9a57d71635f9be2bf5696202 (diff) | |
| download | rust-6df68793f36234cffa9384e056c4575acef5cc27.tar.gz rust-6df68793f36234cffa9384e056c4575acef5cc27.zip | |
Rollup merge of #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.
| -rw-r--r-- | src/tools/tidy/src/ext_tool_checks.rs | 7 |
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 1df4921ef86..8ce44115ef3 100644 --- a/src/tools/tidy/src/ext_tool_checks.rs +++ b/src/tools/tidy/src/ext_tool_checks.rs @@ -364,11 +364,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}", |
