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

chore(tools): better error handling for yarn tool spas command #9340

Merged
merged 4 commits into from
Jul 20, 2023

Conversation

OnkarRuikar
Copy link
Contributor

Summary

Addresses #8950 (comment)

Problem

The blogs repo is not public so BLOG_ROOT environment variable has not been advertised. If the variable is not set then yarn tool spas command throws an error which doesn't make sense at all.

Solution

If the variable is not set then don't run ripgrep command.

How did you test this change?

Tested the code with the variable set and unset in the .env file. Also set the variable to unrelated dir to test match not found message.

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

LGTM, just one nit.

@OnkarRuikar OnkarRuikar requested a review from caugner July 20, 2023 04:34
@caugner caugner merged commit dab1fd9 into mdn:main Jul 20, 2023
@OnkarRuikar OnkarRuikar deleted the blog_root branch July 21, 2023 01:37
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.

3 participants