Avoid systeminfo when launching Fork's rebase editor#154
Open
camjac251 wants to merge 2 commits into
Open
Conversation
Check for wslpath directly instead of launching a Windows system scan. Validate the editor inputs and propagate conversion failures so the rebase editor is never started with an invalid path. Keep the shell harness on a relative script path so failures do not expose the absolute checkout location.
camjac251
marked this pull request as ready for review
July 17, 2026 22:09
Custom WSL kernels may omit Microsoft from uname even when Windows interoperability and wslpath are available. Prefer WSL_INTEROP while retaining the kernel-name fallback for older WSL environments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
wslpathdirectly instead of startingcmd.exe /c systeminfo.WSL_INTEROP, with the historical kernel-name check asa fallback for older environments.
chmodandwslpathfailures instead of launching the editorwith an invalid path.
kernels whose
unameoutput omits Microsoft.Problem
Fork.RIonly needs WSL interoperability andwslpath, but it previouslystarted a Windows
systeminfoscan and parsed the Windows build number beforeevery interactive rebase.
That indirect probe adds an unnecessary Windows process to a latency-sensitive
editor path. A kernel-name-only replacement is also insufficient because
custom WSL kernels can omit Microsoft from
unamewhile interoperability isfully available.
Using
WSL_INTEROPfor environment detection and checkingwslpathdirectlytests the capabilities that the script actually needs.
Verification
bash -n resources/Fork.RI tests/fork-ri.shshellcheck resources/Fork.RI tests/fork-ri.shbash tests/fork-ri.shunameoutput omitsMicrosoft
git diff --check develop...HEADopens without invoking
cmd.exe /c systeminfoCompatibility
The existing
FORK_RI_EXE_PATHnormalization and Windows-path conversionremain in place. The script still launches the configured
Fork.RI.exewith asingle converted rebase-todo path.
WSL_INTEROPis preferred when present. The historical Microsoft kernel-namematch remains as a fallback. Missing
wslpathretainsexit status 1, while missing editor configuration or an invalid argument count
returns exit status 2.
Related issues
Related to #153. This removes the
cmd.exe /c systeminfoinvocation reportedthere, but it does not claim to resolve unrelated failures while launching the
Windows editor executable itself.