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

Guard against missing config and surface config parsing errors #305

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

kevinsawicki
Copy link

@kevinsawicki kevinsawicki commented Feb 3, 2023

This pull request adds a guard on @config being nil in the ensure block in load_config.

This ensures the Psych::SyntaxError is properly surfaced when it is rescued and re-raised via failure! since in that case @config will not have been assigned yet when the ensure block runs.

Fixes #304

@kevinsawicki kevinsawicki marked this pull request as ready for review February 3, 2023 19:08
Copy link
Member

@etiennebarrie etiennebarrie left a comment

Choose a reason for hiding this comment

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

Thanks!

@etiennebarrie
Copy link
Member

There's a linting error. While you're at it can you squash these commits together? Thanks.

@kevinsawicki
Copy link
Author

While you're at it can you squash these commits together?

Sure thing, squashed and trailing whitespace removed 👍

@etiennebarrie etiennebarrie merged commit edb3ae2 into Shopify:main Feb 7, 2023
@kevinsawicki kevinsawicki deleted the surface-syntax-errors branch March 1, 2023 21:36
@shopify-shipit shopify-shipit bot temporarily deployed to production March 27, 2023 21:33 Inactive
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.

Unrelated error is thrown in the event of a syntax error
2 participants