fix(sandbox): remove redundant 'no such file or directory' check from isDockerDaemonUnavailable

Greptile review: 'dial unix' already covers missing Docker socket case
(e.g. 'dial unix /var/run/docker.sock: connect: no such file or directory').
The bare string is also too generic and could cause false positives.
This commit is contained in:
metal
2026-04-29 00:03:22 +00:00
committed by sallyom
parent 570f60b557
commit b64e266a7a

View File

@@ -278,10 +278,7 @@ export function isDockerDaemonUnavailable(stderr: string): boolean {
lower.includes("cannot connect to the docker daemon") ||
lower.includes("dial unix") ||
lower.includes("docker daemon is not running") ||
lower.includes("connection refused") ||
// Docker socket path errors — narrow enough to avoid false positives
lower.includes("no such file or directory") &&
(lower.includes("/var/run/docker") || lower.includes("docker.sock"))
lower.includes("connection refused")
);
}