jdx/mise · error
Could not determine which executable to use for '{}'. Availa
Error message
Could not determine which executable to use for '{}'. Available executables:
{}
Use --bin to specify the correct binary path. What it means
After downloading and extracting, mise found multiple executable files and none of the heuristics produced a winner (no exact filename match for the stub's tool name, no unique name-stem match, more than one executable overall). It lists the sorted candidates and asks you to disambiguate with --bin.
Source
Thrown at src/cli/generate/tool_stub.rs:746
.unwrap_or(false)
})
.collect();
// If there's exactly one match containing the tool name, use it
if name_matches.len() == 1 {
return Ok(name_matches[0].clone());
}
// Strategy 3: If there's only one executable total, use it
if executables.len() == 1 {
return Ok(executables[0].clone());
}
// No good match found, provide helpful error message
let mut exe_list = executables.to_vec();
exe_list.sort();
bail!(
"Could not determine which executable to use for '{}'. Available executables:\n {}\n\nUse --bin to specify the correct binary path.",
tool_name,
exe_list.join("\n ")
);
}
async fn lock_stub(&self) -> Result<String> {
if !self.output.exists() {
bail!(
"Tool stub file does not exist: {}",
display_path(&self.output)
);
}
let mut stub = ToolStubFile::from_file(&self.output)?;
let config = Config::get().await?;
// Allow --version to override the version in the stub for bumpingView on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Pick the right path from the listed candidates and pass it: `--bin bin/ctl` (paths are relative to the extracted archive root, after strip-components)
- Name the output file exactly like the binary so the exact-filename heuristic matches (e.g. `mise generate tool-stub ./ctl ...`)
- Use --platform-bin for archives whose binary layout differs per platform
Example fix
# before mise generate tool-stub ./tool --url https://.../bundle.tar.gz # error lists: ctl, ctl-gen, completions/ctl.bash # after mise generate tool-stub ./ctl --bin ctl --url https://.../bundle.tar.gz
Defensive patterns
Strategy: fallback
Validate before calling
#!/usr/bin/env bash # name the output file exactly after the binary to help the exact-match heuristic mise generate tool-stub "./$(basename "$BIN_PATH")" --url "$url"
Try / catch
if ! mise generate tool-stub ./out --url "$url" 2>err.log; then grep -q 'Could not determine which executable' err.log && mise generate tool-stub ./out --url "$url" --bin "$BIN_PATH"; fi
Prevention
- Name the stub file after the binary it wraps
- In automation, always pass --bin (or --platform-bin) when the archive ships multiple executables
When it happens
Trigger: Archives shipping several executables (e.g. `ctl`, `ctl-gen`, `ctl-completion`, wrappers) where the output file name doesn't exactly match the intended binary; monorepo release archives bundling many tools; output stub named generically (`tool`) so the exact-match heuristic can't identify the right one.
Common situations: Generating a stub for gorelester-style archives that include completion scripts and helpers alongside the main binary; naming the output file something other than the binary name.
Related errors
- No executable files found in archive
- Either --url or --platform-url must be specified
- Cannot change version of existing tool stub from {} to {}
- Could not auto-detect platform from URL: {}. Please specify
- Platform spec must be in format 'platform:url' or just 'url'
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/1505a26f66a66ed8.
Report an issue: GitHub.