Repository navigation
Improve sdcm.exe handling in signing scripts - #75
Merged
Ben Carpenter (Ben-Carpenter) merged 3 commits intoNov 12, 2026
Merged
Ben Carpenter (Ben-Carpenter) merged 3 commits into
Ben Carpenter (Ben-Carpenter) merged 3 commits into
Conversation
…ectory Signing scripts now locate sdcm.exe relative to the script directory ($PSScriptRoot) and exit with a clear error if it is not found. Adds tests for running from another working directory and for a missing executable.
Previously sdcm.exe failures were ignored, so a failed upload/commit/wait continued to later steps and could report Done. Check LASTEXITCODE after each call, exit with sdcm's code, and add a test for failure propagation.
The shipping label JSON referenced an undefined $ProductName, which fails under StrictMode. Add it as an optional parameter defaulting to ProductId and remove the known-issue skip from tests.
Aaron Davida (aDavidaIsNoOne)
approved these changes
Nov 11, 2026
Ben Carpenter (Ben-Carpenter)
deleted the
fix/signing-scripts-sdcm-path-and-errors
branch
November 12, 2026 16:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves how the PowerShell signing scripts (
Attestation.ps1,HLKx.ps1,ShippingLabel.ps1) locate and runsdcm.exe.Changes
sdcm.exein the script's own directory, so the scripts behave the same no matter which folder they're run from.sdcm.exeis not found.sdcm.execall and stop on failure, so later steps (commit, wait, download) don't run after an earlier step has failed.ShippingLabel.ps1: add an optional-ProductNameparameter. It defaults toProductIdand fixes a reference to a variable that was never defined.Scripts/Tests/SdcmPath.Tests.ps1.Behavior notes
sdcm.exefails..signed.zipalready exists now fails instead of reporting success.sdcm.exe -downloaddoes not overwrite an existing file. The scripts now reports this as a failure instead of printingDone. Remove or rename the existing.signed.zipbefore re-running.Testing
powershell -File Scripts\Tests\SdcmPath.Tests.ps1. All tests pass.