fix(doctor): align sandbox image check with main logic

Updated `dockerImageExists` in `src/commands/doctor-sandbox.ts` to mirror the logic in `src/agents/sandbox/docker.ts`. It now re-throws errors unless they are explicitly "No such image" errors.
This commit is contained in:
google-labs-jules[bot]
2026-01-23 23:02:55 +00:00
committed by Peter Steinberger
parent b5f1dc9d95
commit ed560e466f

View File

@@ -78,8 +78,12 @@ async function dockerImageExists(image: string): Promise<boolean> {
try {
await runExec("docker", ["image", "inspect", image], { timeoutMs: 5_000 });
return true;
} catch {
return false;
} catch (error: any) {
const stderr = error?.stderr || error?.message || "";
if (String(stderr).includes("No such image")) {
return false;
}
throw error;
}
}