fix(sandbox): simplify docker image check

Simplify the stderr check in `dockerImageExists` to only look for "No such image", as requested in code review.
This commit is contained in:
google-labs-jules[bot] 2026-01-23 22:22:20 +00:00 committed by Peter Steinberger
parent 39f4faff1e
commit d76d9b07bc

View File

@ -52,11 +52,7 @@ async function dockerImageExists(image: string) {
}); });
if (result.code === 0) return true; if (result.code === 0) return true;
const stderr = result.stderr.trim(); const stderr = result.stderr.trim();
if ( if (stderr.includes("No such image")) {
stderr.includes("No such image") ||
stderr.includes("No such object") ||
stderr.includes("not found")
) {
return false; return false;
} }
throw new Error(`Failed to inspect sandbox image: ${stderr}`); throw new Error(`Failed to inspect sandbox image: ${stderr}`);