diff --git a/scripts/src/hwlab-node.ts b/scripts/src/hwlab-node.ts index e61a4599..6cb909dd 100644 --- a/scripts/src/hwlab-node.ts +++ b/scripts/src/hwlab-node.ts @@ -2266,12 +2266,24 @@ function nodeRuntimeGitMirrorRun(scoped: ReturnType 0 + && !nodeRuntimeGitMirrorNeedsFlush(partialSuccessRecoveryStatus); + const actionSucceeded = isCommandSuccess(result) || fallback?.ok === true || partialSuccessRecovered; + const status = scoped.dryRun || !actionSucceeded + ? undefined + : partialSuccessRecovered + ? partialSuccessRecovery?.status + : nodeRuntimeGitMirrorStatus({ ...scoped, action: "status", dryRun: true, confirm: false }); return { ok: actionSucceeded && (status === undefined || status.ok === true), command: `hwlab nodes git-mirror ${scoped.action} --node ${scoped.node} --lane ${scoped.lane}`, @@ -2286,12 +2298,18 @@ function nodeRuntimeGitMirrorRun(scoped: ReturnType