Repository navigation
Fix data directory and extensions command directory paths on Windows - #109
Merged
Merged
Conversation
The data directory, workspace server log and default config paths were built with path.Join, which always joins with a forward slash, so on Windows they came out as C:\Users\me/.rune. Use filepath.Join. Linux and macOS are unchanged: both functions join the same way there. extensionsCmdDir was "/tmp", which is not an absolute path on Windows. It resolved under the home directory to C:\Users\me\tmp, which does not exist, so building the home workspace's extensions executor failed. Keep "/tmp" on unix and use os.TempDir() on Windows. New tests pin both on every OS: the defaults match filepath.Join, and extensionsCmdDir is an absolute directory that exists. Without this change they fail on Windows, as does the existing TestResolveDefaultConfigPathPrefersYAMLThenStar (unstablebuild#68). Signed-off-by: Eric Brooks <[email protected]>
ernestrc
approved these changes
Sep 20, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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). First runtime fix found by running a locally
built
rune.exeon Windows 11; graphics stay with #82.The data directory, workspace server log and default config paths were built with
path.Join,which always joins with a forward slash, so on Windows they came out as
C:\Users\me/.rune. Theynow use
filepath.Join. Linux and macOS are unchanged: both functions join the same way there.extensionsCmdDirwas"/tmp", which is not an absolute path on Windows. It resolved under thehome directory to
C:\Users\me\tmp, which does not exist, so building the home workspace'sextensions executor failed and the window stayed blank. It stays
"/tmp"on unix and isos.TempDir()on Windows.New tests pin both on every OS: the defaults match
filepath.Join, andextensionsCmdDiris anabsolute directory that exists. On Linux
path.Joinandfilepath.Joinagree, so these cannot failthere before the change; they fail on Windows without it, as does the existing
TestResolveDefaultConfigPathPrefersYAMLThenStar.