fix: surface pgdata backup read-only blockers

This commit is contained in:
Codex
2026-05-20 20:03:43 +00:00
parent c6a27e6c2b
commit d766875a39
6 changed files with 173 additions and 4 deletions
+12 -2
View File
@@ -94,6 +94,10 @@ function dispatchPayload(command: DebugDispatchCommand): Record<string, unknown>
return { source: "cli-debug", ...explicit };
}
function resultOk(result: unknown): boolean {
return typeof result !== "object" || result === null || !("ok" in result) || (result as { ok?: unknown }).ok !== false;
}
function latestJobId(): string {
const jobs = listJobs();
if (jobs.length === 0) throw new Error("No jobs found");
@@ -238,7 +242,10 @@ async function main(): Promise<void> {
}
if (top === "microservice") {
emitJson(commandName, await runMicroserviceCommand(config, args.slice(1)));
const result = await runMicroserviceCommand(config, args.slice(1));
const ok = resultOk(result);
emitJson(commandName, result, ok);
if (!ok) process.exitCode = 1;
return;
}
@@ -261,7 +268,10 @@ async function main(): Promise<void> {
}
if (top === "schedule") {
emitJson(commandName, await runScheduleCommand(config, args.slice(1)));
const result = await runScheduleCommand(config, args.slice(1));
const ok = resultOk(result);
emitJson(commandName, result, ok);
if (!ok) process.exitCode = 1;
return;
}