jdx/mise · error
command does not exist
Error message
command does not exist: {} What it means
When resolving a command, an absolute path is accepted only if it points to an existing file. If the absolute path does not exist (or is a directory), the resolver bails with 'command does not exist: <path>'.
Solutions
- Verify the path exists with `ls -l /path/to/binary` and correct the configured command path
- Install the missing binary or reinstall the tool that provides it
- Use a bare program name instead of an absolute path so PATH lookup (`which`) resolves it
Example fix
// before run(&["/opt/compose/bin/docker-compose", "up"]); // after run(&["docker", "compose", "up"]); // resolved via PATH lookup
Defensive patterns
Strategy: validation
Validate before calling
let path = std::path::Path::new(cmd_path);
if !path.is_file() { eprintln!("command does not exist: {}", path.display()); } Type guard
fn is_executable_file(p: &std::path::Path) -> bool {
p.is_file() && std::fs::metadata(p).map(|m| !m.is_dir()).unwrap_or(false)
} Prevention
- Prefer bare program names resolved via PATH over hardcoded absolute paths
- Verify binary locations after tool upgrades or prefix changes
- Check configured command paths at startup with a dry-run
When it happens
Trigger: Passing a command array whose first element is an absolute path (e.g. `/usr/local/bin/compose`) to the command resolver when that file is absent on disk.
Common situations: Tool installed at a different prefix, stale hardcoded paths in config, binary removed after an upgrade, or typos in the configured path.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Path does not exist: mise resolves this to a trust root…
- a provided source resolves to a path
- a validated copy_link has a staged parent
- bootstrap_command returned an unsafe mise path
- brew-cask: binary artifact
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/a5491f64ba6b08bb.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/compose.rs:1102
.into_iter()
.map(|path| {
if path.is_absolute() {
path
} else {
project_dir.join(path)
}
})
.collect()
}
fn resolve_command(command: &[String]) -> Result<Vec<String>> {
let (program, args) = command
.split_first()
.ok_or_else(|| eyre!("command cannot be empty"))?;
let resolved = if Path::new(program).is_absolute() {
let path = PathBuf::from(program);
if !path.is_file() {
bail!("command does not exist: {}", path.display());
}
path
} else {
crate::file::which(program).ok_or_else(|| eyre!("command not found: {program}"))?
};
Ok(std::iter::once(resolved.to_string_lossy().to_string())
.chain(args.iter().cloned())
.collect())
}
fn validate_project_name(name: Option<&str>) -> Result<()> {
let Some(name) = name else {
return Ok(());
};
if name.is_empty()
|| !name
.chars()
.next()View on GitHub (pinned to 533346cc37)