sindresorhus/opn

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Open using a Windows app referred by its WSL path not supported #117

stephen-zhao posted onGitHub

When I do work on WSL, oftentimes I need to open files using a Windows binary. One example is opening web URLs, where the $BROWSER environment variable is passed in as app in the args. This variable is set as a WSL path, e.g. /mnt/d/Program Files (x86)/Google/Chrome/Application/chrome.exe instead of D:\Program Files (x86)\Google\Chrome\Application\chrome.exe. cmd.exe fails to find the application because it does not understand the WSL path.

We can add support to this by detecting if the app path is a WSL path and convert it to a Windows path if necessary.

Example use-case: Currently, the npm package react-dev-utils makes a call to opn, passing in $BROWSER.


Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests