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

Changed the handling of ErrorActon so it follows Powershell standards #2741

Merged
merged 3 commits into from
Jan 23, 2023

Conversation

KoenZomers
Copy link
Collaborator

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #2558

What is in this Pull Request ?

Changed the handling of ErrorActon so it follows Powershell standards.

This means that an ErrorAction of Stop, Ignore or SilentlyContinue will NOT return an error if something goes wrong. Ignore will also NOT populate $Error whereas the other two will.

Any other ErrorAction besides Stop, Ignore and SilentlyContinue WILL return an exception in case something goes wrong.

@gautamdsheth gautamdsheth merged commit 649c3ac into pnp:dev Jan 23, 2023
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.

[BUG] -ErrorAction "Ignore" is no longer respected when commandlets get an error
2 participants