jdx/mise · error
repos: command is required
Error message
repos: command is required
What it means
The repos exec command runs an arbitrary command inside each configured repo's directory. exec splits the command vec with split_first and requires at least a program name; an empty command list bails immediately with `repos: command is required` before any repo status is computed or any command runs.
Source
Thrown at src/system/repos.rs:215
update_unpinned_repo(&status.request, dry_run)?
}
RepoState::Current => {
info!("repos: {} already current", status.request);
}
RepoState::Dirty | RepoState::Conflict(_) => unreachable!("preflighted above"),
}
}
Ok(())
}
pub fn exec(
requests: &[RepoRequest],
command: &[String],
dry_run: bool,
continue_on_error: bool,
) -> Result<()> {
let Some((program, args)) = command.split_first() else {
bail!("repos: command is required");
};
let statuses = status(requests)?;
let mut failures = vec![];
for status in statuses {
match &status.state {
RepoState::Missing => {
warn!("repos: {}: missing, skipping", status.request);
continue;
}
RepoState::Conflict(reason) => {
warn!("repos: {}: {reason}, skipping", status.request);
continue;
}
RepoState::Current | RepoState::Differs | RepoState::Dirty => {}
}
miseprintln!("repo: {}", status.request);
if dry_run {View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Pass at least a program name, e.g. `... exec -- git status`
- In scripts, guard before invoking: `[ -n "$CMD" ] || { echo "no command" >&2; exit 1; }`
Example fix
# before CMD="" ./run-repos.sh # exec receives an empty command # after [ -n "$CMD" ] || CMD="git status" ./run-repos.sh
Defensive patterns
Strategy: validation
Validate before calling
if command.is_empty() {
return Err(eyre::eyre!("no repos command given"));
}
// or simply: ensure command.split_first().is_some() before calling repos::exec Prevention
- Default the command in wrapper scripts (`CMD=${CMD:-git status}`)
- Fail fast in CI when the command variable is empty instead of passing it through
When it happens
Trigger: Invoking the repos exec CLI form with zero command arguments after the flags; a wrapper script passing an empty or unset variable expansion as the command.
Common situations: Shell scripts with unset variables (`... exec -- $EMPTY_VAR`); quoting mistakes that swallow the command word; CI steps parameterized by an env var that is empty on some runners.
Related errors
- repos: command failed in {}
- no configured repo matched path: {filter}
- relative repo paths are only allowed in a project config; us
- relative repo path `{path_raw}` must stay within the project
- relative repo path `{path_raw}` must name a directory inside
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/dec48d3e38ef9c3b.
Report an issue: GitHub.