-
Couldn't load subscription status.
- Fork 54
Add specific error if PS class resource doesn't implement export #505
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -475,6 +475,10 @@ function Invoke-DscOperation { | |
| 'Export' { | ||
| $t = $dscResourceInstance.GetType() | ||
| $method = $t.GetMethod('Export') | ||
| if ($null -eq $method) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WinPS Adapter doesn't support export |
||
| "Export method not implemented by resource '$($DesiredState.Type)'" | Write-DscTrace -Operation Error | ||
| exit 1 | ||
| } | ||
| $resultArray = $method.Invoke($null,$null) | ||
| $addToActualState = $resultArray | ||
| } | ||
|
|
||
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.
for this
NoExportclass I would get rid of all not-used business-logic (ifconditions) inTestandGetmethods.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.
will update