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

react-dev-utils openBrowser does not work from WSL when $BROWSER is a linux path #6675

Closed
stephen-zhao opened this issue Mar 18, 2019 · 4 comments

Comments

@stephen-zhao
Copy link

stephen-zhao commented Mar 18, 2019

In WSL, despite using a Windows binary browser, my $BROWSER environment variable is set to its *nix path /mnt/d/Program Files (x86)/Google/Chrome/Application/chrome.exe as opposed to its Windows equivalent of D:\Program Files (x86)\Google\Chrome\Application\chrome.exe. This causes openBrowser (from react-dev-utils) to fail.

I noticed that openBrowser makes a call to opn where the root issue actually occurs. So to solve this more generically, I decided to open an issue at their repo as well, where I hope to be submitting a PR soon.

This issue is for reference purposes.

sindresorhus/open#117

@stephen-zhao stephen-zhao changed the title react-dev-utils openBrowser does not work from WSL when $BROWSER is set with a linux path react-dev-utils openBrowser does not work from WSL when $BROWSER is a linux path Mar 18, 2019
@mrmckeb
Copy link
Contributor

mrmckeb commented Mar 25, 2019

That's great @stephen-zhao, please keep us updated on the progress of that PR and we'll be happy to accept a PR here too if needed.

@stephen-zhao
Copy link
Author

stephen-zhao commented Mar 27, 2019

The pull request has been merged at sindresorhus/open#118.

Version 6.0.0 of the package was just released, which includes the necessary changes. The name of the package has changed from 'opn' to 'open', so careful with that.

https://github.com/sindresorhus/open/releases/tag/v6.0.0

@iansu
Copy link
Contributor

iansu commented Mar 28, 2019

@stephen-zhao Thanks for the update. Would you like to make a PR to upgrade that package for us?

@iansu
Copy link
Contributor

iansu commented Jun 30, 2021

Looks like this has been fixed in the open package. Can you try the latest release and see if this has improved? If not please open a new issue.

@iansu iansu closed this as completed Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants