{"record":{"id":"6a9b261ecd89330a","repo":"quarkusio/quarkus","slug":"unable-to-find-name-command","errorCode":null,"errorMessage":"Unable to find ${name} command","messagePattern":"Unable to find (.+?) command","errorType":"console","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/exec/Executable.java","lineNumber":40,"sourceCode":"            }\n        } else {\n            executable = base;\n            path = findExecutable(executable);\n        }\n        if (path == null)\n            return null;\n        return new File(path);\n    }\n\n    public static String findExecutable(String exec) {\n        return ProcessUtil.pathOfCommand(Path.of(exec)).map(Object::toString).orElse(null);\n    }\n\n    public static File findExecutable(String name, String errorMessage, MessageWriter output) {\n        File command = findExecutableFile(name);\n        if (command == null) {\n            output.error(errorMessage);\n            throw new RuntimeException(\"Unable to find \" + name + \" command\");\n        }\n        return command;\n    }\n\n    public static File findWrapper(Path projectRoot, String[] windows, String other) {\n        if (projectRoot == null) {\n            return null;\n        }\n        if (OS.current() == OS.WINDOWS) {\n            for (String name : windows) {\n                File wrapper = new File(projectRoot + File.separator + name);\n                if (wrapper.isFile())\n                    return wrapper;\n            }\n        } else {\n            File wrapper = new File(projectRoot + File.separator + other);\n            if (wrapper.isFile())\n                return wrapper;","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/exec/Executable.java#L22-L58","documentation":"Executable.findExecutable locates a named command-line tool (via findExecutableFile, searching PATH). If it cannot find the executable it logs the supplied errorMessage and throws a plain RuntimeException 'Unable to find <name> command'. Used e.g. for docker, podman or other tooling required by devtools workflows.","triggerScenarios":"findExecutable(\"docker\"|other tool, ...) when the binary is not on PATH — findExecutableFile returns null and the RuntimeException is thrown at Executable.java:40.","commonSituations":"Docker/Podman not installed or not on PATH; running in a slim CI image without the tool; container-in-container environments; misspelled executable name; tool installed only for another user.","solutions":["Install the required tool or add its directory to PATH (verify with `which <name>`).","In CI, use an image that includes the tool (e.g. docker:cli) or install it in a setup step.","If the tool is a wrapper (mvnw/gradlew), ensure project root is correct so findWrapper can locate it.","Check PATH inside containers/systemd contexts where it differs from your shell."],"exampleFix":"// before (shell)\nquarkus dev // fails: Unable to find docker command\n// after\nexport PATH=/usr/local/bin:$PATH  # or: apt-get install -y docker-cli","handlingStrategy":"validation","validationCode":"// Check the tool is on PATH before invoking devtools workflows\nstatic boolean commandOnPath(String name) {\n    return java.util.Arrays.stream(System.getenv(\"PATH\").split(java.io.File.pathSeparator))\n        .anyMatch(dir -> new File(dir, name).canExecute());\n}\nif (!commandOnPath(\"docker\")) throw new IllegalStateException(\"docker not found on PATH\");","typeGuard":null,"tryCatchPattern":"try {\n    File docker = Executable.findExecutable(\"docker\", \"Docker is required\", writer);\n} catch (RuntimeException e) {\n    if (e.getMessage().equals(\"Unable to find docker command\")) {\n        // install the tool or fix PATH, then retry\n    } else throw e;\n}","preventionTips":["Install required tools (docker/podman) and verify with `which`","Use CI images that bundle the needed CLI tools","Set explicit PATH in containerized/systemd environments"],"tags":["executable","path","quarkus-cli","environment"],"backgroundTag":"executable-not-on-path","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}