Repository navigation
Fix PATH setup on Windows and skip the login-shell PATH probe there - #115
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
ernestrc
reviewed
Sep 20, 2026
|
|
||
| // TestSetupManagedBinPathPrependsBinDirOnce asserts that setupManagedBinPath | ||
| // creates the managed dirs and prepends the bin dir to PATH exactly once. | ||
| func TestPrependPATH(t *testing.T) { |
Contributor
There was a problem hiding this comment.
the comment above is incorrect now. Move this test 3 lines up
ernestrc
force-pushed
the
fix-windows-env-path
branch
from
September 30, 2026 14:30
4ee6aa9 to
b11e817
Compare
setRuneBinPATH joined the managed bin directory onto PATH with ':', which on Windows fuses it with the first entry instead of adding a new one. Join with os.PathListSeparator instead. The login-shell PATH probe runs a POSIX script with -i -l -c and /usr/bin/env, which cannot succeed on Windows and spent up to its 10 s timeout on every launch. Move it to a !windows file unchanged; on Windows, which has no login shell that extends PATH, resolve to the current PATH instead. Linux and macOS are unchanged. TestPrependPATH covers both separators, and the existing PATH test no longer assumes ':' (unstablebuild#68). Signed-off-by: Eric Brooks <[email protected]>
…solve The login shell inherits Rune's PATH, which already starts with the bin dir. Shells that keep inherited entries (macOS path_helper, the Windows resolver) hand it back, so the prepend ran twice. prependPATH now drops entries naming the bin dir, compared per platform syntax, and keeps every other entry verbatim, including empty entries and Windows quoting. Co-Authored-By: Rune Agent (claude/claude-opus-5-5) <[email protected]> Signed-off-by: ernestrc <[email protected]>
ernestrc
force-pushed
the
fix-windows-env-path
branch
from
September 30, 2026 14:35
b11e817 to
206e6de
Compare
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
ernestrc
approved these changes
Sep 30, 2026
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.
Part of Windows support (#68, coordinated on #81). Found by running a locally built
rune.exeonWindows 11; graphics stay with #82.
setRuneBinPATHjoined the managed bin directory ontoPATHwith:, which on Windows fuses itwith the first entry instead of adding a new one. It now joins with
os.PathListSeparatorthrougha small pure helper; on Linux and macOS the result is byte-identical to before.
The login-shell
PATHprobe runs a POSIX script with-i -l -cand/usr/bin/env, which cannotsucceed on Windows and spent up to its 10 s timeout on every launch. It moves to a
!windowsfileunchanged; on Windows, which has no login shell that extends
PATH, the currentPATHis used.Tests:
TestPrependPATHcovers both separators and the empty base; the existing PATH test no longerassumes
:; a Windows-tagged test pins that the shell probe is never consulted there. The files arenamed
login_path_*to avoid an add/add conflict with #82'senv_windows.go; once this lands,#82's
detachFromTerminalstub is no longer needed.