Skip to content

fix: Windows compatibility - USERPROFILE fallback and TCP socket on win32#6

Open
NeKoOuO wants to merge 1 commit intovikasprogrammer:mainfrom
NeKoOuO:fix/windows-compatibility
Open

fix: Windows compatibility - USERPROFILE fallback and TCP socket on win32#6
NeKoOuO wants to merge 1 commit intovikasprogrammer:mainfrom
NeKoOuO:fix/windows-compatibility

Conversation

@NeKoOuO
Copy link

@NeKoOuO NeKoOuO commented Feb 26, 2026

Problem

Two bugs prevent walkie-sh from running on Windows:

Bug 1: \process.env.HOME\ is undefined on Windows

Both \src/client.js\ and \src/daemon.js\ used \process.env.HOME\ which is \undefined\ on Windows (the correct variable is \USERPROFILE). Node.js v24 throws \TypeError [ERR_INVALID_ARG_TYPE]\ when \path.join\ receives \undefined.

Bug 2: Unix domain socket not supported on Windows

The daemon uses .sock\ files for IPC, which are Unix-only. On Windows this silently fails with 'Failed to start walkie daemon'.

Fix

  • Bug 1: Use \process.env.HOME || process.env.USERPROFILE\ in both files
  • Bug 2: On \win32, daemon listens on a random TCP loopback port (\127.0.0.1:PORT) and writes the port number to ~/.walkie/daemon.port. Client reads this file to connect. Unix behavior (domain socket) is unchanged.

Closes #5

@NeKoOuO NeKoOuO force-pushed the fix/windows-compatibility branch from ed72f14 to 4237298 Compare February 26, 2026 10:19
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.

Windows compatibility: process.env.HOME undefined + Unix socket not supported

1 participant