mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 08:10:42 +00:00
fix(sandbox): narrow 'no such file or directory' heuristic to Docker socket paths
Greptile review feedback: the bare string is a generic POSIX error. Now requires it to appear alongside '/var/run/docker' or 'docker.sock' to avoid false positives.
This commit is contained in:
@@ -276,10 +276,12 @@ export function isDockerDaemonUnavailable(stderr: string): boolean {
|
||||
const lower = stderr.toLowerCase();
|
||||
return (
|
||||
lower.includes("cannot connect to the docker daemon") ||
|
||||
lower.includes("no such file or directory") ||
|
||||
lower.includes("dial unix") ||
|
||||
lower.includes("docker daemon is not running") ||
|
||||
lower.includes("connection refused")
|
||||
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"))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user