jdx/mise · error

repos: command failed in

Error message

repos: command failed in {}

What it means

The `mise repos exec` command runs a shell command in each configured repository. When a command exits non-zero in one of those repos and `--continue-on-error` is not set, exec aborts immediately with this error naming the offending repo request. It exists so a failing per-repo command surfaces the repo it failed in rather than failing silently.

Solutions

  1. Check the named repo from the message, cd into it, and run the command manually to see the full failure output.
  2. Fix the failing command in that repo (install missing deps, fix the script) or skip/adjust the RepoRequest in mise.toml.
  3. Re-run with --continue-on-error to let other repos proceed and get a full list of failing repos at the end.
  4. Use exec's dry-run/list output first to confirm the command will succeed per repo before running it everywhere.

Example fix

// before: one failing repo aborts everything
mise repos exec -- npm test
// after: continue past failures and review the summary
mise repos exec --continue-on-error -- npm test
Defensive patterns

Strategy: try-catch

Validate before calling

// Preview which repos will run the command first
mise repos list
// Verify the command exists in each repo
git -C <repo> cat-file -e HEAD:package.json 2>/dev/null && echo has package.json

Try / catch

// Run with continue-on-error and handle the aggregate failure
match mise_repos_exec(cmd, /*continue_on_error*/ true) {
    Err(e) if e.to_string().starts_with("repos: command failed in") => {
        for repo in e.to_string().splitn(2, "in ").nth(1).unwrap_or("").split(", ") {
            eprintln!("fix repo: {repo}");
        }
    }
    Ok(()) => {}
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Running `mise repos exec -- <cmd>` where <cmd> exits non-zero in any repo (build failure, missing script, test failure) with continue_on_error disabled; also raised from the final bail listing all failed repos when failures accumulated despite continue-on-error.

Common situations: Bulk-running tests or builds across many cloned repos where one repo's script fails; a repo missing the target script (e.g. no package.json 'test'); PATH/tooling differences inside one repo's directory.

Understand the failure class

Background: "git command failed": what it means when a tool shells out to git and git exits non-zero — this error's family across 21 libraries.

Related errors


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

Appendix: source

Thrown at src/system/repos.rs:263

            "$ (cd {} && {})",
            status.request,
            shell_words::join(command)
        );
        let result = Command::new(program)
            .args(args)
            .current_dir(&status.request.path)
            .status();
        let failed = match result {
            Ok(exit) => !exit.success(),
            Err(err) => {
                warn!("repos: {}: command failed to start: {err}", status.request);
                true
            }
        };
        if failed {
            failures.push(status.request.to_string());
            if !continue_on_error {
                bail!("repos: command failed in {}", status.request);
            }
        }
    }
    if !failures.is_empty() {
        bail!("repos: command failed in {}", failures.join(", "));
    }
    Ok(())
}

fn status_one(request: &RepoRequest) -> Result<RepoStatus> {
    if !request.path.exists() {
        return Ok(missing_status(request));
    }
    if !request.path.is_dir() {
        return Ok(conflict_status(
            request,
            "path exists and is not a directory".to_string(),
        ));

View on GitHub (pinned to 533346cc37)