-
Notifications
You must be signed in to change notification settings - Fork 382
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
Use AST to determine SupportsShouldProcess when an error is thrown #1397
Use AST to determine SupportsShouldProcess when an error is thrown #1397
Conversation
Code change looks ok but the build says it has a problem when targeting psv3, looks like we need a pragma using the
|
Co-Authored-By: Christoph Bergmeister [MVP] <[email protected]>
Ok I've repurposed the SafeGetValue substitute method I wrote to handle that. It's now available as a Helper method. |
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.
Looks good to me. I verified that the diff in Helper.cs/Settings.cs is mainly just the move to make the method publicly accessible.
Only an optional style suggestion.
Co-Authored-By: Christoph Bergmeister [MVP] <[email protected]>
Co-Authored-By: Christoph Bergmeister [MVP] <[email protected]>
PR Summary
Fixes #1217.
When PowerShell throws an error due to not being able to resolve an attribute type, we sift through the AST to determine whether
SupportsShouldProcess
has been set on a function.Also cleans up some of the logic so it's not all nested
as
s.PR Checklist
.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
to the beginning of the title and remove the prefix when the PR is ready.