Skip to content

Commit b307531

Browse files
authored
Unrolled build for rust-lang#126348
Rollup merge of rust-lang#126348 - Kobzol:venv-debug-error, r=albertlarsan68 Improve error message if dependency installation in tidy fails Should help with easier debugging of issues occuring during [venv installation](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/PR.20CI.20broken) of `tidy` dependencies.
2 parents 921645c + 9bba39c commit b307531

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/tools/tidy/src/ext_tool_checks.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,18 @@ fn create_venv_at_path(path: &Path) -> Result<(), Error> {
274274
if out.status.success() {
275275
return Ok(());
276276
}
277-
let err = if String::from_utf8_lossy(&out.stderr).contains("No module named virtualenv") {
277+
278+
let stderr = String::from_utf8_lossy(&out.stderr);
279+
let err = if stderr.contains("No module named virtualenv") {
278280
Error::Generic(format!(
279281
"virtualenv not found: you may need to install it \
280282
(`python3 -m pip install venv`)"
281283
))
282284
} else {
283-
Error::Generic(format!("failed to create venv at '{}' using {sys_py}", path.display()))
285+
Error::Generic(format!(
286+
"failed to create venv at '{}' using {sys_py}: {stderr}",
287+
path.display()
288+
))
284289
};
285290
Err(err)
286291
}

0 commit comments

Comments
 (0)