Skip to content

fix: Check Type instance has DscResource attribute#812

Merged
SteveL-MSFT merged 1 commit intoPowerShell:mainfrom
haodeon:fix/winPS-ClassBased
May 20, 2025
Merged

fix: Check Type instance has DscResource attribute#812
SteveL-MSFT merged 1 commit intoPowerShell:mainfrom
haodeon:fix/winPS-ClassBased

Conversation

@haodeon
Copy link
Contributor

@haodeon haodeon commented May 14, 2025

PR Summary

PR #797 introduced a workaround to detect if DSC resources were ClassBased. This PR adds an additional validation by checking the instance has the DscResource attribute.

PR Context

The workaround incorrectly sets ImplementationDetail to ClassBased when there is another type with the same name, like TimeZone or Environment.

@Gijsreyn
Copy link
Collaborator

Nice catch @haodeon!

@haodeon haodeon force-pushed the fix/winPS-ClassBased branch from 00d97b2 to e7e6292 Compare May 15, 2025 03:47
@haodeon haodeon changed the title fix: Check instance properties have DscProperty attribute fix: Check Type instance has DscResource attribute May 15, 2025
@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue May 20, 2025
Merged via the queue into PowerShell:main with commit 367d952 May 20, 2025
6 of 7 checks passed
@haodeon haodeon deleted the fix/winPS-ClassBased branch May 27, 2025 12:52
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.

4 participants