Skip to content

Conversation

@Gijsreyn
Copy link
Contributor

@Gijsreyn Gijsreyn commented Dec 13, 2025

PR Summary

Fixes dsc resource set to route to the delete operation when _exist is set to false for resources that have the Delete capability but not SetHandlesExist.

The implementation mirrors the existing logic from configuration documents and reuses the get_diff function for calculating the changedProperties. I've decided to manually construct the SetResult response since delete() returns () rather than state info as a design decision.

PR Context

Fixes #1268.

$out.changedProperties | Should -BeNullOrEmpty
}

It '_exist false routes to delete operation' {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a test case to handle what-if for this scenario?

Copy link
Contributor Author

@Gijsreyn Gijsreyn Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is --what-if not only for dsc config? I can't seem to find them on dsc resource options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling set with _exist is false does not run delete

2 participants