Use wslview on WSL even when gio is installed#71
Conversation
Byron
left a comment
There was a problem hiding this comment.
Thanks a lot for bringing this up!
Reordering linux launchers to do better on Windows Subsystem for Linux seems like a bias that would disadvantage the typical linux system which now have to pay for an extra command invocation attempt.
However, an additional file check seems cheap enough and will improve compatibility.
If the above works, could you adjust the PR accordingly or find a cheap way to test for WSL?
Thanks a lot.
|
Sure thing, I've updated the PR so it will only attempt to run wslview when running in WSL. I've looked into this space before and I believe the I ran |
|
Thanks a lot, especially for the due diligence! I have additionally limited the |
This PR upgrades the [`open`](https://github.com/Byron/open-rs) crate (used in the `start` command) from 4.0.1 to 4.0.2. This fixes a bug where `open` doesn't always work properly on WSL: Byron/open-rs#71



This PR fixes a bug I've been experiencing on WSL.
I have
gioinstalled in my WSL environment because it comes bundled withglib. Because of this,open-rsattempts to usegioand fails:To solve this, this PR just reorders the launchers used on unix so that
wslviewis attempted first. I think this is desirable behaviour because ifwslviewis present we're almost certainly in WSL.If you foresee any problems with this approach, I could rewrite this to check whether we're in WSL before attempting to use
wslview.