jdx/mise · error

failed

Error message

{} {} failed: {}

What it means

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.

Solutions

  1. Read the stderr portion of the message to see the underlying compose failure and fix it
  2. Verify the docker daemon is running (`docker info`) and the compose file is valid (`docker compose config`)
  3. Re-run the failing command manually with the shown arguments to reproduce interactively
  4. Check file permissions and paths referenced by the compose configuration

Example fix

// before (opaque failure)
compose_cmd(&["up", "-d"])?;
// after (inspect the real cause first)
// run `docker compose up -d` manually; the error text contains program, args and stderr
Defensive patterns

Strategy: try-catch

Validate before calling

// Rust-ish guard before invoking
if !Path::new("/var/run/docker.sock").exists() { bail!("docker daemon not running"); }
let out = std::process::Command::new("docker").args(["compose","config","-q"]).output()?;
if !out.status.success() { bail!("compose file invalid: {}", String::from_utf8_lossy(&out.stderr)); }

Type guard

fn ensure_success(status: &std::process::ExitStatus) -> bool { status.success() }

Try / catch

match compose_up() {
    Err(e) if e.to_string().contains("failed:") => log_compose_stderr_and_retry(e),
    Err(e) => return Err(e),
    Ok(v) => v,
}

Prevention

When it happens

Trigger: 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.

Common situations: Malformed compose YAML, docker daemon stopped, missing images/services, port conflicts, or insufficient permissions when running compose during environment setup.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/e1e608aee606de60. Report an issue: GitHub.

Appendix: source

Thrown at src/system/compose.rs:981

    let compose = command.iter().position(|part| part == "compose")?;
    (compose > 0).then_some(&command[..compose])
}

fn command_output(program: &str, args: &[String], sudo: bool) -> Result<String> {
    let env = compose_env();
    let output = if sudo {
        crate::system::sudo::output(program, args, &env)?
    } else {
        info!("$ {} {}", program, shell_words::join(args));
        Command::new(program).args(args).envs(env).output()?
    };
    checked_stdout(output, program, args)
}

fn checked_stdout(output: Output, program: &str, args: &[String]) -> Result<String> {
    if !output.status.success() {
        let error = String::from_utf8_lossy(&output.stderr).trim().to_string();
        bail!(
            "{} {} failed: {}",
            program,
            shell_words::join(args),
            if error.is_empty() {
                output.status.to_string()
            } else {
                error
            }
        );
    }
    Ok(String::from_utf8(output.stdout)?)
}

fn command_with_args(command: Vec<String>, args: Vec<String>) -> Result<(String, Vec<String>)> {
    let (program, prefix) = command
        .split_first()
        .ok_or_else(|| eyre!("resolved engine command is empty"))?;
    Ok((

View on GitHub (pinned to 533346cc37)