-
Notifications
You must be signed in to change notification settings - Fork 34
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
Blocked non-list operations on adapters #525
Conversation
17f211c
to
72bb968
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the check should be in the lib instead of the exe, perhaps here? https://github.com/PowerShell/DSC/blob/main/dsc_lib/src/dscresources/dscresource.rs#L190
I've tried this, but realized that because the way we call adapted resources (we substitute adapted resource with adapter before calling lib's get/set/etc...) a way to differentiate between a call on an adapted resource vs call on an adapter within the lib is not trivial and I think it's not worth it. |
PR Summary
Fix #516
Currently when non-list operations are executed on an adapter the error message is misleading;
This PR adds a check early in the call chain and prints a clear error message.
For example: