From 1a7e846c16666675c8bca50a8882a97261d91ac2 Mon Sep 17 00:00:00 2001 From: aschumann-virtualcable Date: Thu, 15 Oct 2026 12:07:08 +0200 Subject: [PATCH] build(windows): stop the build script when docker build or cargo build fails build.ps1 did not check $LASTEXITCODE, so a failed docker build or a failed cargo build inside the container was ignored and the script went on, exiting with 0. The packaging step then aborted later on a missing binaries\udsactor-service.exe, far from the real error. This is the build script part of fix-time-sync-stop-borrow. The Rust part of that branch (binding the stop signal before select!) is already in master through 8e473d8, so this branch carries only the script change. --- building/windows/build.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/building/windows/build.ps1 b/building/windows/build.ps1 index 13cc840..f699b9b 100644 --- a/building/windows/build.ps1 +++ b/building/windows/build.ps1 @@ -1,9 +1,13 @@ # Ensure udsactor-builder is up up date # To be executed on building/windows/ directory +$ErrorActionPreference = "Stop" + docker build -t udsactor-builder . +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } # Get full path of the ../.. directory (i.e., the root of the project) $projectDir = Convert-Path ../.. # Run the container with the current directory mounted docker run --rm -v ${projectDir}:c:\crate -w /crate udsactor-builder cargo build --release +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } # Note: the target/release/*.exe binaries will be created \ No newline at end of file