{"record":{"id":"93b4572d2c7f6df9","repo":"wagoodman/dive","slug":"cannot-find-podman-client-executable","errorCode":null,"errorMessage":"cannot find podman client executable","messagePattern":"cannot find podman client executable","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dive/image/podman/cli.go","lineNumber":18,"sourceCode":"//go:build linux || darwin\n\npackage podman\n\nimport (\n\t\"fmt\"\n\t\"github.com/wagoodman/dive/internal/log\"\n\t\"github.com/wagoodman/dive/internal/utils\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n)\n\n// runPodmanCmd runs a given Podman command in the current tty\nfunc runPodmanCmd(cmdStr string, args ...string) error {\n\tif !isPodmanClientBinaryAvailable() {\n\t\treturn fmt.Errorf(\"cannot find podman client executable\")\n\t}\n\n\tallArgs := utils.CleanArgs(append([]string{cmdStr}, args...))\n\n\tfullCmd := strings.Join(append([]string{\"docker\"}, allArgs...), \" \")\n\tlog.WithFields(\"cmd\", fullCmd).Trace(\"executing\")\n\n\tcmd := exec.Command(\"podman\", allArgs...)\n\tcmd.Env = os.Environ()\n\n\tcmd.Stdout = os.Stdout\n\tcmd.Stderr = os.Stderr\n\tcmd.Stdin = os.Stdin\n\n\treturn cmd.Run()\n}\n\nfunc streamPodmanCmd(args ...string) (error, io.Reader) {","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/podman/cli.go#L1-L36","documentation":"runPodmanCmd checks isPodmanClientBinaryAvailable() (a PATH lookup for the podman executable) before shelling out. If 'podman' cannot be found via exec.LookPath, every podman-engine command run through this helper returns this error immediately — no command is attempted.","triggerScenarios":"Any dive code path that runs an interactive podman command (runPodmanCmd) while dive is configured to use the podman source (dive --source podman, or source selection in dive's config) on a machine where the podman binary is not installed or not on PATH.","commonSituations":"Running dive with podman engine inside a minimal container (dive's own docker image) that lacks the podman client; podman installed via snap/homebrew in a non-standard location not on PATH; CI images that only have docker; shells whose PATH was stripped (cron, systemd services).","solutions":["Install podman (e.g. 'apt install podman', 'brew install podman') and confirm 'podman --version' works in the same shell","If podman exists but isn't found, add its directory to PATH or symlink it into /usr/local/bin","If you actually meant to inspect a docker image, point dive at the docker source: 'dive --source docker <image>'","In containerized dive, mount the podman socket AND install the podman client in the image, or run dive on the host"],"exampleFix":"# before\ndive --source podman myimg:latest   # cannot find podman client executable\n\n# after\nwhich podman || sudo apt-get install -y podman\npodman --version\ndive --source podman myimg:latest","handlingStrategy":"validation","validationCode":"// Fail fast before invoking any podman-source path.\nif _, err := exec.LookPath(\"podman\"); err != nil {\n    return fmt.Errorf(\"podman client required: install podman or use the docker source\")\n}\n// safe to run dive with --source podman now","typeGuard":null,"tryCatchPattern":"if err := diveRunPodman(...); err != nil {\n    if strings.Contains(err.Error(), \"cannot find podman client executable\") {\n        // environment problem: install podman or switch source; do not retry unchanged\n    }\n}","preventionTips":["Preflight 'command -v podman' in scripts before selecting the podman engine","Pin the engine explicitly in .dive.yaml ('engine: docker') on machines without podman","In containerized CI, bake the podman client into the image or mount the host socket plus client"],"tags":["podman","path","executable","cli","dive"],"backgroundTag":null,"analyzedSha":"d6c691947f8fda635c952a17ee3b7555379d58f0","analyzedAt":"2026-08-15T09:42:35.293Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}