{"record":{"id":"e1e608aee606de60","repo":"jdx/mise","slug":"failed","errorCode":null,"errorMessage":"{} {} failed: {}","messagePattern":"(.+?) (.+?) failed: (.+?)","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/system/compose.rs","lineNumber":924,"sourceCode":"    let compose = command.iter().position(|part| part == \"compose\")?;\n    (compose > 0).then_some(&command[..compose])\n}\n\nfn command_output(program: &str, args: &[String], sudo: bool) -> Result<String> {\n    let env = compose_env();\n    let output = if sudo {\n        crate::system::sudo::output(program, args, &env)?\n    } else {\n        info!(\"$ {} {}\", program, shell_words::join(args));\n        Command::new(program).args(args).envs(env).output()?\n    };\n    checked_stdout(output, program, args)\n}\n\nfn checked_stdout(output: Output, program: &str, args: &[String]) -> Result<String> {\n    if !output.status.success() {\n        let error = String::from_utf8_lossy(&output.stderr).trim().to_string();\n        bail!(\n            \"{} {} failed: {}\",\n            program,\n            shell_words::join(args),\n            if error.is_empty() {\n                output.status.to_string()\n            } else {\n                error\n            }\n        );\n    }\n    Ok(String::from_utf8(output.stdout)?)\n}\n\nfn command_with_args(command: Vec<String>, args: Vec<String>) -> Result<(String, Vec<String>)> {\n    let (program, prefix) = command\n        .split_first()\n        .ok_or_else(|| eyre!(\"resolved engine command is empty\"))?;\n    Ok((","sourceCodeStart":906,"sourceCodeEnd":942,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/compose.rs#L906-L942","documentation":"Every external invocation mise makes for a compose project (e.g. `docker compose ps --format json`, `docker compose config --hash=*`, `up`, `down`) goes through checked_stdout. If the process exits non-zero, mise bails with the exact program, joined args, and the child's stderr (or the exit status when stderr is empty). This is a pass-through error: the root cause is in the docker/compose output, not in mise.","triggerScenarios":"Docker daemon not running (`Cannot connect to the Docker daemon`); invalid or missing compose file/env_files; port, name, or network conflicts during up; registry auth failure during pull; sudo = true when the sudo call fails.","commonSituations":"Docker Desktop not started on macOS/Windows; compose file references an env var that is unset; a previous project left containers/networks behind; image pull rate-limited; rootless docker socket not writable by the invoking user.","solutions":["Read the docker/compose stderr embedded in the message — it names the actual failure","Verify the daemon with `docker info` (or your engine equivalent) and start it if down","Validate the project with `docker compose -f <file> config` before running mise bootstrap","Check that all files and env_files listed in the compose entry exist relative to project_dir","For sudo = true entries, confirm `sudo <engine> compose version` works non-interactively"],"exampleFix":"# before: daemon not running\n$ mise bootstrap\nError: docker compose ps --format json failed: Cannot connect to the Docker daemon at unix:///var/run/docker.sock\n\n# after: start the daemon, re-run\n$ sudo systemctl start docker\n$ mise bootstrap","handlingStrategy":"validation","validationCode":"# preflight: daemon reachable and compose file valid\n<engine> info >/dev/null || { echo 'engine daemon down' >&2; exit 1; }\n<engine> compose --project-directory <dir> config >/dev/null || { echo 'compose config invalid' >&2; exit 1; }","typeGuard":null,"tryCatchPattern":"In Rust: match on the eyre::Report and print it verbatim — the embedded child stderr is the actionable text; distinguish daemon-down ('Cannot connect') from config errors before retrying after the daemon starts.","preventionTips":["Keep daemon startup (systemctl enable --now docker / Docker Desktop) as a provisioning step before bootstrap","List every compose file and env_file explicitly in the entry so missing files fail early","Use pull = \"never\" in CI when images are preloaded, to avoid registry auth failures"],"tags":["compose","docker","subprocess","bootstrap"],"backgroundTag":"subprocess-non-zero-exit","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}