Closed ehuss closed 1 year ago
The strategy on WSL is to try wslview
first, then try the system xdg-open
, so that error is actually produced from trying to launch a non-existing xdg-open
.
I agree the error should be clearer, ideally by mentioning that neither wslview
or xdg-open
were found. This will involve modifying our error enum.
Some users have reported issues with using cargo on WSL where they cannot open the documentation. There are a fair number of distributions in the Microsoft Store that do not preinstall wslview. The error message is a rather difficult one to understand:
It would be helpful if the error message could provide some more context. Particularly that it is the
wslview
executable that cannot be found (and maybe even some more help on what to do about that). Perhaps there could be more variants ofOpenError
for specific errors like these?Anytime
Command.spawn
is used, it might be good to wrap that error with information about which command is being executed.