mirror of
https://github.com/rust-lang/rust
synced 2024-07-20 18:05:58 +00:00
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.
This commit is contained in:
commit
6df68793f3
|
@ -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}",
|
||||
|
|
Loading…
Reference in a new issue