Skip to content

Commit 51363f5

Browse files
committed
Auto merge of #3700 - RalfJung:miri-script, r=RalfJung
./miri: nicer error when building miri-script fails
2 parents de8f05c + 699b7d4 commit 51363f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/miri/miri

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ set -e
33
# Instead of doing just `cargo run --manifest-path .. $@`, we invoke miri-script binary directly. Invoking `cargo run` goes through
44
# rustup (that sets it's own environmental variables), which is undesirable.
55
MIRI_SCRIPT_TARGET_DIR="$(dirname "$0")"/miri-script/target
6-
cargo +stable build $CARGO_EXTRA_FLAGS -q --target-dir "$MIRI_SCRIPT_TARGET_DIR" --manifest-path "$(dirname "$0")"/miri-script/Cargo.toml
6+
cargo +stable build $CARGO_EXTRA_FLAGS -q --target-dir "$MIRI_SCRIPT_TARGET_DIR" --manifest-path "$(dirname "$0")"/miri-script/Cargo.toml || \
7+
( echo "Failed to build miri-script. Is the 'stable' toolchain installed?"; exit 1 )
78
"$MIRI_SCRIPT_TARGET_DIR"/debug/miri-script "$@"

0 commit comments

Comments
 (0)