Repository navigation
Stop deployment when setup scripts cannot be written - #42
Merged
Merged
Conversation
Co-authored-by: OSDeploy <12970006+OSDeploy@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The expanded failure handler now emits a misleading image-expansion warning for setup-script failures, and planned validation remains incomplete.
Review effort: Balanced
Findings: 1
What changed in this PR
Makes setup-directory and script-write failures terminate within the existing installation failure handler.
Changes:
- Adds
-ErrorAction Stopto setup directory/file creation. - Makes
SetupComplete.cmdandOOBE.cmdwrites terminating.
| File | Description |
|---|---|
OSDCloud/private/steps/4-install/step-install-expandwindowsimage.ps1 |
Routes setup initialization failures through the existing catch block. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ":: RecastOSDCloud $(Get-Date -format s)" | Out-File -FilePath 'C:\Windows\Setup\Scripts\OOBE.cmd' -Append -Encoding ascii -Width 2000 -Force -ErrorAction Stop | ||
| } | ||
| catch { | ||
| Write-Warning "[$(Get-Date -format s)] Expand-WindowsImage failed." |
Copilot
AI
changed the title
[WIP] Fix code based on review comments
Stop deployment when setup scripts cannot be written
Oct 6, 2026
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.

Setup script creation or writes could fail non-terminatingly, allowing deployment to continue without complete setup. Make these operations terminating so failures reach the existing handler.
-ErrorAction Stopto setup directory/file creation and both script writes.