jdx/mise · error
Platform bin spec must be in format 'platform:path', got: {}
Error message
Platform bin spec must be in format 'platform:path', got: {} What it means
Each --platform-bin value must be exactly `platform:path` with a colon separating the platform target from the binary path inside the extracted archive. parse_platform_bin_spec splits on the first ':' and rejects values with no colon at all.
Source
Thrown at src/cli/generate/tool_stub.rs:538
// Format: platform:url
let parts: Vec<&str> = spec.splitn(2, ':').collect();
if parts.len() != 2 {
bail!(
"Platform spec must be in format 'platform:url' or just 'url' (for auto-detection). Got: {}",
spec
);
}
let platform = parts[0].to_string();
let url = parts[1].to_string();
Ok((platform, url))
}
}
fn parse_platform_bin_spec(&self, spec: &str) -> Result<(String, String)> {
let parts: Vec<&str> = spec.splitn(2, ':').collect();
if parts.len() != 2 {
bail!(
"Platform bin spec must be in format 'platform:path', got: {}",
spec
);
}
let platform = parts[0].to_string();
let bin_path = parts[1].to_string();
Ok((platform, bin_path))
}
async fn analyze_url(
&self,
url: &str,
mpr: &std::sync::Arc<crate::ui::multi_progress_report::MultiProgressReport>,
) -> Result<(String, u64, Option<String>)> {
// Create a temporary directory for download and extraction
let temp_dir = tempfile::tempdir()?;View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Always include the platform prefix: `--platform-bin windows-x64:tool.exe --platform-bin linux-x64:bin/tool`
- For a single platform-neutral binary path, use plain `--bin bin/tool` instead of --platform-bin
- Verify the platform token matches one mise recognizes (e.g. linux-x64, osx-arm64) — an unknown platform string parses but will never match at install time
Example fix
# before mise generate tool-stub ./ctl --platform-bin bin/ctl.exe # after mise generate tool-stub ./ctl --platform-bin windows-x64:bin/ctl.exe
Defensive patterns
Strategy: validation
Validate before calling
#!/usr/bin/env bash
for spec in "${platform_bins[@]}"; do
[[ "$spec" == *:* ]] || { echo "bad platform-bin spec (need platform:path): $spec" >&2; exit 2; }
done
mise generate tool-stub ./out --platform-bin "${platform_bins[@]}" Try / catch
mise generate tool-stub ./out --platform-bin "$spec" 2>err.log || { grep -q 'platform:path' err.log && echo "fix platform-bin spec: $spec" >&2 && exit 2; } Prevention
- Use plain --bin for single platform-neutral binary paths
- Use one recognized platform token per binary (linux-x64, osx-arm64, windows-x64)
When it happens
Trigger: Passing `--platform-bin tool.exe` or `--platform-bin ./bin/tool` (no platform prefix); quoting errors that split the pair; on Windows-style specs where extra colons shift the split, e.g. `--platform-bin windows-x64:C:\path\tool.exe` (the first colon wins, so this specific form is fine, but `C:\path` alone is not).
Common situations: Hand-writing platform-bin lists for cross-platform stubs; assuming --platform-bin mirrors --bin's bare-path syntax.
Related errors
- Platform spec must be in format 'platform:url' or just 'url'
- 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
- No executable files found in archive
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/0e597a0394563024.
Report an issue: GitHub.