sindresorhus / open

Open stuff like URLs, files, executables. Cross-platform.
MIT License
3.18k stars 219 forks source link

Remove implicit dependency on wslvar binary (#198) #204

Closed tim-stasse closed 3 years ago

tim-stasse commented 3 years ago

Fixes #198 Fixes #200

tim-stasse commented 3 years ago

I believe this would make 200 redundant (if accepted).

sindresorhus commented 3 years ago

Can you describe your changes and why they're required?

sindresorhus commented 3 years ago

@tim-stasse Friendly bump :)

anaisbetts commented 3 years ago

@sindresorhus I think I can explain - wslvar is not a built-in component, it's optional software that many people don't have. While Powershell is guaranteed to exist, wslvar is very much not. fwiw, this bug breaks popular software such as Storybook on WSL because open fails

An easy way to replace wslvar is to just do something similar to https://github.com/anaisbetts/ssh-agent-relay/blob/master/bin/ssh-agent-relay#L15, use cmd.exe to echo the Windows environment variable