Skip to content

Commit 4fa5192

Browse files
committed
print sysroot build failure error
1 parent fba3d79 commit 4fa5192

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/tools/miri/cargo-miri/src/setup.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,11 @@ pub fn setup(subcommand: &MiriCommand, target: &str, rustc_version: &VersionMeta
137137
.rustflags(rustflags)
138138
.cargo(cargo_cmd)
139139
.build_from_source(&rust_src)
140-
.unwrap_or_else(|_| {
141-
if only_setup {
142-
show_error!("failed to build sysroot, see error details above")
140+
.unwrap_or_else(|err| {
141+
if print_sysroot {
142+
show_error!("failed to build sysroot")
143+
} else if only_setup {
144+
show_error!("failed to build sysroot: {err:?}")
143145
} else {
144146
show_error!(
145147
"failed to build sysroot; run `cargo miri setup` to see the error details"

0 commit comments

Comments
 (0)