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

Correct error handling in require ruby-pwsh #325

Merged

Conversation

benningm
Copy link
Contributor

The error handling around the require for 'ruby-pwsh'
tries to rescue with nil, but does not pass an argument
to rescue which by default will rescue only StandardError.

In this case it should rescue the LoadError which is not
a StandardError:

LoadError.is_a? StandardError => false

@benningm benningm requested a review from a team as a code owner May 25, 2021 13:25
@CLAassistant
Copy link

CLAassistant commented May 25, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@michaeltlombardi michaeltlombardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you for this patch!

@michaeltlombardi
Copy link
Contributor

@benningm - if you could sign the CLA, we'd love to merge this PR!

The error handling around the require for 'ruby-pwsh'
tries to rescue with nil, but does not pass an argument
to rescue which by default will rescue only StandardError.

In this case it should rescue the LoadError which is not
a StandardError:

  LoadError.is_a? StandardError => false
@daianamezdrea
Copy link
Contributor

@benningm, as we promised, I'll push the merge button ! Thank you for your contribution ! Cheers!

@daianamezdrea daianamezdrea merged commit 3b5f596 into puppetlabs:main Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants