{"record":{"id":"dec48d3e38ef9c3b","repo":"jdx/mise","slug":"repos-command-is-required","errorCode":null,"errorMessage":"repos: command is required","messagePattern":"repos: command is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/repos.rs","lineNumber":218,"sourceCode":"                update_unpinned_repo(&status.request, dry_run)?\n            }\n            RepoState::Current => {\n                info!(\"repos: {} already current\", status.request);\n            }\n            RepoState::Dirty | RepoState::Conflict(_) => unreachable!(\"preflighted above\"),\n        }\n    }\n    Ok(())\n}\n\npub(crate) async fn exec(\n    requests: &[RepoRequest],\n    command: &[String],\n    dry_run: bool,\n    continue_on_error: bool,\n) -> Result<()> {\n    let Some((program, args)) = command.split_first() else {\n        bail!(\"repos: command is required\");\n    };\n    let statuses = status(requests).await?;\n    let mut failures = vec![];\n    for status in statuses {\n        match &status.state {\n            RepoState::Missing => {\n                warn!(\"repos: {}: missing, skipping\", status.request);\n                continue;\n            }\n            RepoState::Conflict(reason) => {\n                warn!(\"repos: {}: {reason}, skipping\", status.request);\n                continue;\n            }\n            RepoState::Current | RepoState::Differs | RepoState::Dirty => {}\n        }\n\n        miseprintln!(\"repo: {}\", status.request);\n        if dry_run {","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/repos.rs#L200-L236","documentation":"The repos exec entry point splits the provided command slice into program + args; an empty command slice has no program to run, so exec bails with `repos: command is required` before touching any repos. The command is what gets run inside each configured repo checkout.","triggerScenarios":"Calling the repos exec path with `command = []` — e.g. `mise repos exec` with no command arguments supplied.","commonSituations":"Invoking the CLI without the command after flags; a script variable holding the command expanding to empty; mis-ordered flags causing the command tokens to be consumed elsewhere.","solutions":["Supply a command, e.g. `mise repos exec -- git status`","Check script variables so the command string is not empty at invocation time","Verify flags (like `--`) ordering so the command tokens are not swallowed as flags"],"exampleFix":"# before\nmise repos exec --\n# after\nmise repos exec -- git status","handlingStrategy":"validation","validationCode":"[ -n \"$CMD\" ] || { echo \"repos exec: command is required\"; exit 1; }\nmise repos exec -- $CMD","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"command is required\") => {\n        eprintln!(\"supply a command: mise repos exec -- <program> [args...]\");\n    }\n    Err(e) => return Err(e),\n    Ok(v) => v,\n}","preventionTips":["Always pass a command after `--` when invoking repos exec","Guard script variables that build the command string against being empty","Verify flag ordering so command tokens are not consumed as flags"],"tags":["cli","missing-argument","git","exec"],"backgroundTag":"missing-cli-argument","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"}