Repository navigation
Fix DISM resource input handling - #1741
Merged
Steve Lee (SteveL-MSFT) merged 4 commits intoOct 8, 2026
Merged
Steve Lee (SteveL-MSFT) merged 4 commits into
Steve Lee (SteveL-MSFT) merged 4 commits into
Conversation
Pass resource JSON through an explicit --input argument so export operations without filters do not block on stdin. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Existing what-if tests still pipe JSON to dism_dsc and will fail under the new argument-only protocol.
1 open finding
What changed in this PR
Updates DISM resources to pass JSON explicitly, preventing unfiltered exports from blocking on stdin.
Changes:
- Adds
--inputmanifest arguments for DISM operations. - Replaces stdin reading with argument parsing.
- Updates export tests and usage text.
| File | Description |
|---|---|
resources/dism_dsc/src/main.rs |
Reads JSON from --input. |
resources/dism_dsc/locales/en-us.toml |
Updates CLI usage text. |
resources/dism_dsc/windows_feature.dsc.resource.json |
Configures argument-based input. |
resources/dism_dsc/optionalfeature.dsc.resource.json |
Configures argument-based input. |
resources/dism_dsc/featureondemand.dsc.resource.json |
Configures argument-based input. |
resources/dism_dsc/tests/windowsFeature_export.tests.ps1 |
Exercises exports through dsc.exe. |
resources/dism_dsc/tests/optionalFeature_export.tests.ps1 |
Exercises exports through dsc.exe. |
resources/dism_dsc/tests/featureOnDemand_export.tests.ps1 |
Exercises exports through dsc.exe. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Route Windows feature what-if tests through the resource manifest so they validate the --input argument protocol. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Return ExitCode from dism_dsc instead of terminating with process::exit so LLVM coverage profiles are written after Pester invokes the resource. Add focused tests for input argument parsing and dispatch exit codes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

dsc resource exportcould block when a DISM resource received no filter becausedism_dscattempted to read inherited stdin. This prevented commands such asdsc resource export -r Microsoft.Windows/WindowsFeatureListfrom enumerating all features.This change:
--inputargument for every DISM resource operationdsc.exefor Windows features, optional features, and Features on DemandValidation: