jdx/mise · error
an exec entry with no command
Error message
an exec entry with no command
What it means
run_tool executes one of a tool's own executables as described by an argv list from the packslip resource commands. Before running, it takes the first element as the program via argv.split_first(); an empty argv has no command at all, so it bails. This is a malformed-manifest guard: an exec entry must name the command to run.
Source
Thrown at src/packslip.rs:1054
.list_current_installed_versions(config)
.into_iter()
.find(|(b, _)| b.ba().short == name || b.tool_name() == name || b.id() == name);
match by_name {
Some(found) => Ok(found),
None => bail!("{name} is not an active, installed tool or one of their executables"),
}
}
/// Run one of the tool's own executables and return what it printed.
async fn run_tool(
config: &Arc<Config>,
backend: &Arc<dyn Backend>,
tv: &ToolVersion,
argv: &[String],
env: &BTreeMap<String, String>,
) -> Result<String> {
let Some((program, args)) = argv.split_first() else {
bail!("an exec entry with no command");
};
let Some(path) = backend.which(config, tv, program).await? else {
bail!("{} has no executable called {program}", tv.style());
};
run_resource_command(
&path,
args,
env,
&tv.install_path(),
std::time::Duration::from_secs(5),
)
.await
}
/// Run vendor resource generation outside the user's project, without
/// input, under a deadline. Empty output is a failed source, never a cache hit.
async fn run_resource_command(
path: &Path,View on GitHub (pinned to afd2eddd3a)
Solutions
- Fix the manifest/resource command so the exec entry's argv array has at least one element (the program).
- If the argv comes from a template, verify the variable that supplies the command resolves to a non-empty value.
- Validate the packslip resource commands before running (run the packslip check/validation flow).
Example fix
# before (packslip manifest) exec = [] # after exec = ["rg", "--version"]
Defensive patterns
Strategy: validation
Validate before calling
if argv.is_empty() {
return Err(anyhow!("resource command argv must contain at least a program"));
} Type guard
let Some((program, args)) = argv.split_first() else { return Err(anyhow!("an exec entry with no command")); }; Try / catch
match run_tool(config, &backend, &tv, &argv, &env).await {
Err(e) if e.to_string().contains("no command") => eprintln!("Fix the exec entry: it must name a program"),
Ok(out) => use(out),
Err(e) => return Err(e),
} Prevention
- Never emit an empty argv array in packslip exec entries.
- Validate manifests (check that every exec entry has a non-empty command) before execution.
- Test templated commands resolve to non-empty strings in CI.
When it happens
Trigger: A resource command's exec argv array is empty (e.g. `exec = []` or a computed/templated argv that expands to nothing), so split_first() returns None when run_tool is invoked from completion_script.
Common situations: A hand-edited or templated packslip manifest where the command string was left blank or a template variable failed to expand; array built programmatically from an empty config value.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- the packslip names an executable {:?}, which is not a plain
- packslip artifact must declare extensions.mise.plugin = vfox
- vfox plugin artifacts must not declare executables
- vfox plugin artifacts must not declare host requirements
- packslip: list_identity_prefix must be a non-empty string
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/1ac7eab4c12de95e.
Report an issue: GitHub.