From 8fa91d283bebe5e8f91b83a07993e1306c27c9c3 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 23 Mar 2026 11:49:55 -0700 Subject: [PATCH] fix(cli): preserve posix default git dir --- src/cli/update-cli/shared.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli/update-cli/shared.ts b/src/cli/update-cli/shared.ts index 27f8fc459f2..3f2046b870b 100644 --- a/src/cli/update-cli/shared.ts +++ b/src/cli/update-cli/shared.ts @@ -121,7 +121,11 @@ export function resolveGitInstallDir(): string { } function resolveDefaultGitDir(): string { - return path.join(os.homedir(), "openclaw"); + const home = os.homedir(); + if (home.startsWith("/")) { + return path.posix.join(home, "openclaw"); + } + return path.join(home, "openclaw"); } export function resolveNodeRunner(): string {