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 {