{"record":{"id":"e1e608aee606de60","repo":"jdx/mise","slug":"failed","errorCode":null,"errorMessage":"{} {} failed: {}","messagePattern":"(.+?) (.+?) failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/compose.rs","lineNumber":981,"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":963,"sourceCodeEnd":999,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/compose.rs#L963-L999","documentation":"This error is thrown when a docker compose (or other external program) subprocess invoked through the checked runner exits with a non-zero status. The message embeds the program name, the shell-joined argument list, and the captured stderr (or the raw exit status when stderr is empty), so it is a generic wrapper around any child-process failure.","triggerScenarios":"Any call to the compose helpers (e.g. `compose ...` commands routed through `checked`/`checked_stdout`) where the spawned process terminates unsuccessfully — compose build failures, invalid compose files, daemon not running, etc.","commonSituations":"Malformed compose YAML, docker daemon stopped, missing images/services, port conflicts, or insufficient permissions when running compose during environment setup.","solutions":["Read the stderr portion of the message to see the underlying compose failure and fix it","Verify the docker daemon is running (`docker info`) and the compose file is valid (`docker compose config`)","Re-run the failing command manually with the shown arguments to reproduce interactively","Check file permissions and paths referenced by the compose configuration"],"exampleFix":"// before (opaque failure)\ncompose_cmd(&[\"up\", \"-d\"])?;\n// after (inspect the real cause first)\n// run `docker compose up -d` manually; the error text contains program, args and stderr","handlingStrategy":"try-catch","validationCode":"// Rust-ish guard before invoking\nif !Path::new(\"/var/run/docker.sock\").exists() { bail!(\"docker daemon not running\"); }\nlet out = std::process::Command::new(\"docker\").args([\"compose\",\"config\",\"-q\"]).output()?;\nif !out.status.success() { bail!(\"compose file invalid: {}\", String::from_utf8_lossy(&out.stderr)); }","typeGuard":"fn ensure_success(status: &std::process::ExitStatus) -> bool { status.success() }","tryCatchPattern":"match compose_up() {\n    Err(e) if e.to_string().contains(\"failed:\") => log_compose_stderr_and_retry(e),\n    Err(e) => return Err(e),\n    Ok(v) => v,\n}","preventionTips":["Validate the compose file with `docker compose config` before running","Check docker daemon health before invoking compose","Log full stderr from subprocesses for diagnostics"],"tags":["subprocess","docker-compose","process-exit"],"backgroundTag":"command-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}