From 28c10d6f2235e0d3eef8c86df14edbddb86aff52 Mon Sep 17 00:00:00 2001 From: Ross Smyth Date: Mon, 26 Feb 2024 14:16:04 -0500 Subject: [PATCH] Fix miri.bat not bailing early on error --- src/tools/miri/miri.bat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/miri/miri.bat b/src/tools/miri/miri.bat index 91e8a6e8f3b2..959e54d8844d 100644 --- a/src/tools/miri/miri.bat +++ b/src/tools/miri/miri.bat @@ -2,7 +2,10 @@ :: Windows will not execute the bash script, and select this. @echo off set MIRI_SCRIPT_TARGET_DIR=%0\..\miri-script\target -cargo build %CARGO_EXTRA_FLAGS% -q --target-dir %MIRI_SCRIPT_TARGET_DIR% --manifest-path %0\..\miri-script\Cargo.toml + +:: If any other steps are added, the "|| exit /b" must be appended to early +:: return from the script. If not, it will continue execution. +cargo build %CARGO_EXTRA_FLAGS% -q --target-dir %MIRI_SCRIPT_TARGET_DIR% --manifest-path %0\..\miri-script\Cargo.toml || exit /b :: Forwards all arguments to this file to the executable. :: We invoke the binary directly to avoid going through rustup, which would set some extra