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

Check default paths first when running on Mac #209

Merged
merged 8 commits into from
Jun 26, 2020

Conversation

christian-bromann
Copy link
Contributor

@christian-bromann christian-bromann commented Jun 25, 2020

Running the lsregister dump can take up to a couple seconds on MacOS. This patch ensures that we check for default paths first and only do the dump if the browser is not located in /Applications/Google Chrome.app or /Applications/Google Chrome Canary.app.

Note: I couldn't really test all execution paths for the new method as I am not able to stub the fs package entirely (as you could do it with jest for example).

fixes: #207

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

thanks very much @christian-bromann! 🎉

src/chrome-launcher.ts Outdated Show resolved Hide resolved
src/chrome-launcher.ts Outdated Show resolved Hide resolved
src/chrome-launcher.ts Outdated Show resolved Hide resolved
src/chrome-launcher.ts Outdated Show resolved Hide resolved
@christian-bromann
Copy link
Contributor Author

@patrickhulce addressed comments

@christian-bromann
Copy link
Contributor Author

@patrickhulce thanks for the feedback. I moved the logic into the Chrome finder. Looks much better now.

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

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.

Finding installation path is sometimes slow on mac
2 participants