jdx/mise · error · eyre::Report
rar format not supported
Error message
rar format not supported
What it means
extract_archive bails immediately when the resolved ExtractionFormat is Rar: mise ships no RAR decoder anywhere in the extraction API (not in extract_archive, not in open_tar, not in content verification). RAR is a hard unsupported format rather than a temporarily missing feature.
Source
Thrown at src/file.rs:1937
| ExtractionFormat::TarBz2
| ExtractionFormat::TarZst
| ExtractionFormat::Tar
| ExtractionFormat::TarBr
| ExtractionFormat::TarLz4
| ExtractionFormat::TarSz
| ExtractionFormat::Raw => untar(archive, dest, format, opts),
ExtractionFormat::Zip => unzip(archive, dest, opts),
ExtractionFormat::SevenZip => un7z(archive, dest, opts),
ExtractionFormat::Gz
| ExtractionFormat::Xz
| ExtractionFormat::Bz2
| ExtractionFormat::Zst
| ExtractionFormat::Br
| ExtractionFormat::Lz4
| ExtractionFormat::Sz => {
bail!("extract_archive does not support compressed single-file format: {format}")
}
ExtractionFormat::Rar => bail!("rar format not supported"),
}
}
pub fn untar(
archive: &Path,
dest: &Path,
format: ExtractionFormat,
opts: &ExtractOptions,
) -> Result<()> {
if !format.is_tar_archive() && format != ExtractionFormat::Raw {
bail!("untar only supports tar formats, got {}", format);
}
debug!("tar -xf {} -C {}", archive.display(), dest.display());
if let Some(pr) = &opts.pr {
pr.set_message(format!(
"extract {}",
archive.file_name().unwrap().to_string_lossy()View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Pick a non-RAR release asset (.tar.gz, .tar.xz, .zip, .7z) from the same release
- If the tool must be installed, extract the rar yourself with unrar or 7z x in a custom task/plugin, outside extract_archive
- Fix the backend/aqua asset pattern so it no longer matches .rar files
Defensive patterns
Strategy: validation
Validate before calling
// reject rar before downloading/extracting
if archive.extension().is_some_and(|e| e.eq_ignore_ascii_case("rar")) {
anyhow::bail!("unsupported asset format: rar; use a .tar.gz/.zip variant");
} Type guard
fn is_supported_extract_format(f: ExtractionFormat) -> bool {
f != ExtractionFormat::Rar
&& !matches!(f, ExtractionFormat::Gz | ExtractionFormat::Xz | ExtractionFormat::Bz2
| ExtractionFormat::Zst | ExtractionFormat::Br | ExtractionFormat::Lz4 | ExtractionFormat::Sz)
} Prevention
- Pin asset patterns to known-good extensions (.tar.gz, .tar.xz, .tar.zst, .zip) in tool config
- Never route .rar files into mise's extraction API - there is no decoder
When it happens
Trigger: Calling extract_archive(archive, dest, ExtractionFormat::Rar, opts), almost always because extension detection on a .rar release asset resolved the format to Rar.
Common situations: A tool distributes its release as .rar (rare on Linux tool registries); an asset matcher or backend config names a .rar file; a user assumes an asset is a zip when it is actually rar.
Related errors
- extract_archive does not support compressed single-file form
- untar only supports tar formats, got {}
- {} is not a tar archive
- zip format not supported
- strip-components > 1 is not supported
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/1be292b6de418731.
Report an issue: GitHub.