From 1fc6564195d307ad1485775f226ffca3e7c29153 Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Mon, 8 Dec 2025 12:29:49 +1100 Subject: [PATCH] fix: use cygpath on Windows for temp dir path conversion On Windows, pwd in Git Bash returns Unix-style paths like /c/Users/... which Node's fs and spawn APIs misinterpret as C:\c\Users\... Use cygpath -w to convert to native Windows paths. --- src/node/services/streamManager.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node/services/streamManager.ts b/src/node/services/streamManager.ts index fb22c84b1c..51df9e45d0 100644 --- a/src/node/services/streamManager.ts +++ b/src/node/services/streamManager.ts @@ -271,7 +271,10 @@ export class StreamManager extends EventEmitter { public async createTempDirForStream(streamToken: StreamToken, runtime: Runtime): Promise { // Create directory and get absolute path (works for both local and remote) // Use 'cd' + 'pwd' to resolve ~ to absolute path - const command = `mkdir -p ~/.mux-tmp/${streamToken} && cd ~/.mux-tmp/${streamToken} && pwd`; + // On Windows, use cygpath to convert Git Bash path to native Windows path + const isWindows = process.platform === "win32"; + const pwdCmd = isWindows ? 'cygpath -w "$(pwd)"' : "pwd"; + const command = `mkdir -p ~/.mux-tmp/${streamToken} && cd ~/.mux-tmp/${streamToken} && ${pwdCmd}`; const result = await execBuffered(runtime, command, { cwd: "/", timeout: 10,