From f3bd6e4957908b8e36d32c2417dd067a7e9fe594 Mon Sep 17 00:00:00 2001 From: Benjamin Jesuiter Date: Sun, 11 Jan 2026 02:02:39 +0100 Subject: [PATCH] fix(update): use git status --porcelain for dirty check cross-platform --- src/infra/update-runner.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/infra/update-runner.ts b/src/infra/update-runner.ts index 0e53a006a..49e3e2802 100644 --- a/src/infra/update-runner.ts +++ b/src/infra/update-runner.ts @@ -305,15 +305,17 @@ export async function runGatewayUpdate( const beforeSha = beforeShaResult.stdout.trim() || null; const beforeVersion = await readPackageVersion(gitRoot); - const cleanCheck = await runStep( + const statusCheck = await runStep( step( - "clean check", - ["sh", "-c", `test -z "$(git -C '${gitRoot}' status --porcelain)"`], + "Running git status", + ["git", "-C", gitRoot, "status", "--porcelain"], gitRoot, ), ); - steps.push(cleanCheck); - if (cleanCheck.exitCode !== 0) { + steps.push(statusCheck); + const hasUncommittedChanges = + statusCheck.stdoutTail && statusCheck.stdoutTail.trim().length > 0; + if (hasUncommittedChanges) { return { status: "skipped", mode: "git",