jdx/mise · error · eyre::Report

{} {} failed: {}

Error message

{} {} failed: {}

What it means

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.

Source

Thrown at src/system/compose.rs:924

    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 9dcfcaa0dc)

Solutions

  1. Read the docker/compose stderr embedded in the message — it names the actual failure
  2. Verify the daemon with `docker info` (or your engine equivalent) and start it if down
  3. Validate the project with `docker compose -f <file> config` before running mise bootstrap
  4. Check that all files and env_files listed in the compose entry exist relative to project_dir
  5. For sudo = true entries, confirm `sudo <engine> compose version` works non-interactively

Example fix

# before: daemon not running
$ mise bootstrap
Error: docker compose ps --format json failed: Cannot connect to the Docker daemon at unix:///var/run/docker.sock

# after: start the daemon, re-run
$ sudo systemctl start docker
$ mise bootstrap
Defensive patterns

Strategy: validation

Validate before calling

# preflight: daemon reachable and compose file valid
<engine> info >/dev/null || { echo 'engine daemon down' >&2; exit 1; }
<engine> compose --project-directory <dir> config >/dev/null || { echo 'compose config invalid' >&2; exit 1; }

Try / catch

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.

Prevention

When it happens

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

Common situations: 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.

Related errors


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