Skip to content

Add a default launch mode on Windows - #110

Merged
ernestrc merged 5 commits into
unstablebuild:mainfrom
ejb711:add-windows-launch-mode
Sep 21, 2026
Merged

ernestrc merged 5 commits into
unstablebuild:mainfrom
ejb711:add-windows-launch-mode

Conversation

@ejb711

@ejb711 ejb711 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Part of Windows support (#68, coordinated on #81). Found by running a locally built rune.exe on
Windows 11; graphics stay with #82.

Started without a mode flag, as from a double-click or a shortcut, Rune injects the defaults a
desktop launcher would pass. Only macOS and Linux had any, so on Windows it printed "one of --gui,
--tui or --headless must be set" to a console nobody sees and exited. Windows now gets the same
defaults, -G -w "", so it opens the GUI. bundleZdotDir already returns false there, so no
zdotdir flag is added.

Test note: TestAppLaunchArgs had a "windows unsupported" row asserting the old behavior; it
becomes "windows without zdotdir" expecting the GUI defaults, and a FreeBSD row keeps the
no-default branch covered. Verified natively: with no mode flag the GUI window opens and launch.log
is written under the data directory.

Started without a mode flag, as from a double-click or a shortcut, Rune injects the
defaults a desktop launcher would pass. Only macOS and Linux had any, so on Windows it
printed "one of --gui, --tui or --headless must be set" to a console nobody sees and
exited. Give Windows the same defaults, -G -w "", so it opens the GUI.

Other platforms keep no default; the table test covers one alongside the new Windows
case (unstablebuild#68).

Signed-off-by: Eric Brooks <[email protected]>
@ernestrc
ernestrc enabled auto-merge (squash) September 19, 2026 00:50
@codecov

codecov Bot commented Sep 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

ernestrc pushed a commit that referenced this pull request Sep 20, 2026
…tening (#111)

Part of Windows support (#68, coordinated on #81). Found by running a
locally built `rune.exe` on Windows 11; graphics stay with #82.

`newUnixListener` created `<dataDir>/sockets` only after `bind(2)`
failed with `ENOENT`. On Windows, AF_UNIX reports a missing parent
directory as `WSAENETDOWN` instead, so the directory was never
created, every retry failed, and the home workspace's extensions
never started. The directory is now created before the first bind; the
retry loop keeps its stale-socket handling unchanged.

Linux and macOS behave the same: the `ENOENT` path only ever created
this directory, and `MkdirAll` on an existing one is a no-op. A new test starts
a listener under a data directory that does not exist yet and checks the socket
lands in `<dataDir>/sockets`.

Verified natively: with this, #110 and the other Windows slices applied
locally, a first launch on a fresh data directory logs zero errors
and the socket file is created.

Signed-off-by: Eric Brooks <[email protected]>
@ernestrc
ernestrc merged commit f4f8f04 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