Last 12 weeks · 3 commits
4 of 6 standards met
also matches keys. A default browser whose id collides with a prototype key passed the check, resolved to an inherited function through , and produced — launching a bogus app instead of failing with " is not supported as a default browser". On Windows the id comes from the registry ( reads the user-writable ProgId), so an id like or is reachable in practice. Before Fix Use and throw the existing unsupported-browser error for any id that does not map to a known browser. Test locks the own-property semantics the fix relies on.
Hi, I've been using this library successfully for quite some time to open a local file (the "index.html" file containing a Jest coverage report). Unfortunately, since the update to v11, it no longer works. Is this a breaking change (I haven't been able to find the changelog)? Or is it a bug? I am on Windows 10. Thanks.
Description On WSL/Ubuntu, can fail depending on the current working directory. This happens when running as a non-default WSL user whose CWD is not traversable by the distro's default user. Reproduction If is not traversable by the distro's default user, the URL does not open. Making the directory traversable immediately fixes it: Likely cause Under WSL, launches Windows PowerShell. The spawned Windows process inherits Node's Linux CWD. That CWD is exposed to Windows as something like: Windows access to the WSL filesystem uses the distro's default Linux user. If that user cannot traverse the CWD, the spawned PowerShell process appears to fail before opening the URL. ' PowerShell availability check succeeds because it only checks whether is executable; it does not verify that PowerShell can actually start from the current WSL CWD. Expected behavior Opening an HTTP(S) URL should not depend on whether the Windows-side process can access the caller's Linux CWD. Potential fix: when spawning PowerShell from WSL, use a known Windows-accessible instead of inheriting the current Linux directory. should work, or should also work, in my tests I could also go to (if that is available) and it worked - it doesn't do anything with the directory, AFAICT, so this shouldn't really matter?
Repository: sindresorhus/open. Description: Open stuff like URLs, files, executables. Cross-platform. Stars: 3497, Forks: 257. Primary language: JavaScript. Languages: JavaScript (97.7%), TypeScript (2.3%). License: MIT. Latest release: v11.0.1 (1w ago). Open PRs: 1, open issues: 2. Last activity: 1w ago. Community health: 85%. Top contributors: sindresorhus, Richienb, watson, kuzalekon, Kudo, alan-agius4, pluma, arthurvr, reneleonhardt, tim-stasse and others.