Skip to content

Commit 91f5f53

Browse files
committed
Auto merge of #3329 - RossSmyth:miri-bat-error, r=RalfJung
Fix miri.bat not bailing early on error There is a logical error in the batch script that I did not think about. Currently, if the build step for miri-script fails, it will continue on and attempt to execute the next line. This will either lead to a file not found error, or running an old miri-script. With this, it will bail upon erroring in the build step.
2 parents bbabee1 + fb8e860 commit 91f5f53

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

miri.bat

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
:: Windows will not execute the bash script, and select this.
33
@echo off
44
set MIRI_SCRIPT_TARGET_DIR=%0\..\miri-script\target
5-
cargo build %CARGO_EXTRA_FLAGS% -q --target-dir %MIRI_SCRIPT_TARGET_DIR% --manifest-path %0\..\miri-script\Cargo.toml
5+
6+
:: If any other steps are added, the "|| exit /b" must be appended to early
7+
:: return from the script. If not, it will continue execution.
8+
cargo build %CARGO_EXTRA_FLAGS% -q --target-dir %MIRI_SCRIPT_TARGET_DIR% --manifest-path %0\..\miri-script\Cargo.toml || exit /b
69

710
:: Forwards all arguments to this file to the executable.
811
:: We invoke the binary directly to avoid going through rustup, which would set some extra

0 commit comments

Comments
 (0)