Fixes issue #2313 - Convert WSL2 file paths to Windows file paths
Description
When using VSCode on Windows where projects are hosted in a linux WSL2 environment the Open Files Context Provider fails. The reason is that VSCode does not know how to interpret the filepaths.
This PR adds a conversion step to all file paths if the given path is coming from a WSL2 environment.
Checklist
- [x] The base branch of this PR is
dev, rather thanmain - [x] The relevant docs, if any, have been updated or created
Testing
Added a unit test for the VsCodeIde.ts class covering these specific changes.
@sestinj is there something that is blocking this from being merged, anything I can address? It'd be nice to get that sweet open file functionality in my instance of VSCode without running my local copy.
Just a heads up, I think i've discovered a much simpler approach to solve this issue without having to run the wslpath process. I'll be pushing the update here shortly.
@sestinj I've push my change to remove the process call to wslpath, i've tested this locally and it works. I suspect this could also fix the remote-file issue I read about earlier however I have not had a chance to test that.
Potentially fixes #2451.
@steverhoades this is excellent! Thanks for finding a cleaner way, and sorry for delay. If you could do me a quick favor and remove the package-lock/package.json changes (they look unnecessary now) I'll go ahead and merge!
done
Beautiful, thank you!