From ed560e466f5250d82f759586212accedc2492200 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 23:02:55 +0000 Subject: [PATCH] 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. --- src/commands/doctor-sandbox.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/commands/doctor-sandbox.ts b/src/commands/doctor-sandbox.ts index 2b665c52c..d46af4ca4 100644 --- a/src/commands/doctor-sandbox.ts +++ b/src/commands/doctor-sandbox.ts @@ -78,8 +78,12 @@ async function dockerImageExists(image: string): Promise { 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; } }