Skip to content

Fix data directory and extensions command directory paths on Windows - #109

Merged
ernestrc merged 3 commits into
unstablebuild:mainfrom
ejb711:fix-windows-paths
Sep 21, 2026
Merged

ernestrc merged 3 commits into
unstablebuild:mainfrom
ejb711:fix-windows-paths

Conversation

@ejb711

@ejb711 ejb711 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Part of Windows support (#68, coordinated on #81). First runtime fix found by running a locally
built rune.exe on 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. They
now 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 and the window stayed blank. It stays "/tmp" on unix and is
os.TempDir() on Windows.

New tests pin both on every OS: the defaults match filepath.Join, and extensionsCmdDir is an
absolute directory that exists. On Linux path.Join and filepath.Join agree, so these cannot fail
there before the change; they fail on Windows without it, as does the existing
TestResolveDefaultConfigPathPrefersYAMLThenStar.

ejb711 and others added 2 commits September 18, 2026 10:13
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]>
@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ernestrc
ernestrc merged commit 08d5d1a into unstablebuild:main Sep 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants