{"record":{"id":"3e92f1e098c23e0a","repo":"jdx/mise","slug":"podman-pull-succeeded-but-printed-no-image-id","errorCode":null,"errorMessage":"podman pull succeeded but printed no image ID","messagePattern":"podman pull succeeded but printed no image ID","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/oci/run.rs","lineNumber":283,"sourceCode":"fn load_image(engine: Engine, image_dir: &Path) -> Result<String> {\n    match engine {\n        Engine::Podman => {\n            let src = format!(\"oci:{}\", image_dir.display());\n            let out = Command::new(\"podman\")\n                .args([\"pull\", \"--quiet\", &src])\n                .output()\n                .wrap_err(\"running `podman pull`\")?;\n            if !out.status.success() {\n                let stderr = String::from_utf8_lossy(&out.stderr);\n                bail!(\"podman pull failed: {}: {stderr}\", out.status);\n            }\n            // `podman pull --quiet` prints just the image ID on stdout.\n            let id = String::from_utf8(out.stdout)\n                .wrap_err(\"podman pull produced non-utf8 output\")?\n                .trim()\n                .to_string();\n            if id.is_empty() {\n                bail!(\"podman pull succeeded but printed no image ID\");\n            }\n            Ok(id)\n        }\n        Engine::Docker => {\n            // Stream the layout into `docker load` as a docker-archive. Pick\n            // a per-invocation tag so concurrent `mise oci run` calls don't\n            // clobber each other — a shared `mise-oci:run` tag would\n            // otherwise race: the second load would overwrite the first\n            // image before the first container started.\n            let tag = format!(\n                \"mise-oci:run-{}-{}\",\n                std::process::id(),\n                std::time::SystemTime::now()\n                    .duration_since(std::time::UNIX_EPOCH)\n                    .map(|d| d.as_nanos())\n                    .unwrap_or(0)\n            );\n            crate::oci::docker_archive::load_into_docker(image_dir, &tag)?;","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/cli/oci/run.rs#L265-L301","documentation":"mise identifies the loaded image by parsing the trimmed stdout of `podman pull --quiet` as an image ID (deterministic across podman versions, per the code comment). If the command exits 0 but stdout is empty, mise cannot construct the `podman run <id>` invocation or the later `podman rmi` cleanup, so it bails rather than guessing.","triggerScenarios":"A podman version/configuration where `pull --quiet` prints the ID to stderr or nowhere (e.g. JSON log driver redirecting output, odd TTY handling, patched distro podman); stdout consumed by wrappers that capture fds.","commonSituations":"Distro-patched or very new podman builds changing --quiet output behavior; running under process supervisors that capture/redirect the child's stdout; containers with a redirected podman log destination.","solutions":["Manually verify what your podman prints: `podman pull --quiet oci:<dir>` — if empty, upgrade/downgrade podman","Switch engines: `mise oci run --engine docker ...` (docker path loads a docker-archive with a tag instead)","Report the podman version to the mise issue tracker if a stock podman reproduces it"],"exampleFix":"# before\nmise oci run --engine podman ghcr.io/you/devenv:tag -- bash\n# after\nmise oci run --engine docker ghcr.io/you/devenv:tag -- bash","handlingStrategy":"fallback","validationCode":"# bash: probe that podman prints an ID for --quiet pulls before relying on it\ntest_id=$(podman pull --quiet \"oci:$dir\" 2>/dev/null || true)\nif [ -z \"$test_id\" ]; then ENGINE_ARG=\"--engine docker\"; fi\nmise oci run $ENGINE_ARG -- bash","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin container engine versions in CI so --quiet output behavior cannot drift","Keep `--engine docker` as the documented fallback for environments with odd podman builds"],"tags":["oci","run","podman","output-parsing","version-compatibility"],"backgroundTag":"podman-pull-empty-output","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}