Clean up Fork.RI and fix Windows short paths usage #126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While investigating around issue #124, I found out a lot of errors were thrown out of the Fork.RI script:
uname -a
does not contain the WSL build version anymore, making the current check for build 17046 or greater fail with a syntax error because of the format of the regexC:\PROGRA~1
instead ofC:\Program Files
to avoid spaces), theFORK_RI_EXE_PATH
could contain invalid paths as the short name translatesPROGRA~1
toProgram/ Files
, even inside a WSL environmentAs such, this PR contains several changes, each one in its own commit:
cmd.exe
to retrieve the build version consistently (should work with WSL1 too)Several downsides can be noted:
As-is, this PR enables the usage of Fork's interactive rebase tool by manually editing
%localappdata%/Fork/settings.json
to change"GitInstancePath": "C:\\Users\\Surname Lastname\\wslgit\\bin\\git.exe",
to"GitInstancePath": "C:\\Users\\SURNAM~1\\wslgit\\bin\\git.exe",
(confirmed with the author of #124)I'm planning on sending a support request to Fork's maintainers to ask them if it could support spaces in Fork.RI's path, enabling wslgit to work under all setups