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

Set-ModuleFunctions powershell invoke error handling #98

Open
wants to merge 1 commit into
base: nextversion
Choose a base branch
from

Conversation

Dejulia489
Copy link

Resolved #97

@Dejulia489
Copy link
Author

Before:
image

After:
image

@RamblingCookieMonster
Copy link
Owner

Hiyo! Thanks, and sorry for the... year of waiting? ouch!

Some quick questions:

  • Could there be scenarios where both HadErrors is $false, and $Module is not defined? Would it be worth adding the -not $Module bit as an else if?
  • Are there scenarios where HadErrors is $true, but the actual error stream is not indicative of an error state (e.g. asinine programs that write output to error stream)? I suspect this could happen. I wonder if a -IgnoreHadErrors parameter, with your logic changing to $PowerShell.HadErrors -and -not $IgnoreHadErrors or something along those lines would be worth it?

Cheers! cc @jonathanmedd

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.

None yet

2 participants