Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSC "Reasons" needs prefix #12

Closed
Jaykul opened this issue Apr 21, 2023 · 2 comments · Fixed by #13
Closed

DSC "Reasons" needs prefix #12

Jaykul opened this issue Apr 21, 2023 · 2 comments · Fixed by #13
Assignees
Labels
bug Something isn't working

Comments

@Jaykul
Copy link

Jaykul commented Apr 21, 2023

Sorry for the drive-by issue, but basically, we can't use [Reasons] because if everyone does it, it breaks DSC.

dsccommunity/DscResource.Base#4

This is Microsoft's fault, but their approach so far is to just tell you to use a different name:
https://learn.microsoft.com/en-us/powershell/dsc/concepts/resources?view=dsc-3.0#embedding-classes

It seems obvious (to me) that they should just expose a [Reasons] class themselves (or just use a PSObject), but whatever.
One way to fix it is to just rename the class. Another way would be to follow this example:
dsccommunity/DscResource.Base#10

@ThomasNieto ThomasNieto transferred this issue from anypackage/anypackage Apr 21, 2023
@ThomasNieto ThomasNieto self-assigned this Apr 21, 2023
@ThomasNieto ThomasNieto added the bug Something isn't working label Apr 21, 2023
@ThomasNieto
Copy link
Member

@Jaykul thanks for the info. I'll get a fix out.

@ThomasNieto
Copy link
Member

@Jaykul v0.1.1 has been published with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants