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:
committed by
Peter Steinberger
parent
b5f1dc9d95
commit
ed560e466f
@@ -78,9 +78,13 @@ async function dockerImageExists(image: string): Promise<boolean> {
|
||||
try {
|
||||
await runExec("docker", ["image", "inspect", image], { timeoutMs: 5_000 });
|
||||
return true;
|
||||
} catch {
|
||||
} catch (error: any) {
|
||||
const stderr = error?.stderr || error?.message || "";
|
||||
if (String(stderr).includes("No such image")) {
|
||||
return false;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
function resolveSandboxDockerImage(cfg: ClawdbotConfig): string {
|
||||
|
||||
Reference in New Issue
Block a user