{"record":{"id":"1be292b6de418731","repo":"jdx/mise","slug":"rar-format-not-supported","errorCode":null,"errorMessage":"rar format not supported","messagePattern":"rar format not supported","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/file.rs","lineNumber":1937,"sourceCode":"        | ExtractionFormat::TarBz2\n        | ExtractionFormat::TarZst\n        | ExtractionFormat::Tar\n        | ExtractionFormat::TarBr\n        | ExtractionFormat::TarLz4\n        | ExtractionFormat::TarSz\n        | ExtractionFormat::Raw => untar(archive, dest, format, opts),\n        ExtractionFormat::Zip => unzip(archive, dest, opts),\n        ExtractionFormat::SevenZip => un7z(archive, dest, opts),\n        ExtractionFormat::Gz\n        | ExtractionFormat::Xz\n        | ExtractionFormat::Bz2\n        | ExtractionFormat::Zst\n        | ExtractionFormat::Br\n        | ExtractionFormat::Lz4\n        | ExtractionFormat::Sz => {\n            bail!(\"extract_archive does not support compressed single-file format: {format}\")\n        }\n        ExtractionFormat::Rar => bail!(\"rar format not supported\"),\n    }\n}\n\npub fn untar(\n    archive: &Path,\n    dest: &Path,\n    format: ExtractionFormat,\n    opts: &ExtractOptions,\n) -> Result<()> {\n    if !format.is_tar_archive() && format != ExtractionFormat::Raw {\n        bail!(\"untar only supports tar formats, got {}\", format);\n    }\n\n    debug!(\"tar -xf {} -C {}\", archive.display(), dest.display());\n    if let Some(pr) = &opts.pr {\n        pr.set_message(format!(\n            \"extract {}\",\n            archive.file_name().unwrap().to_string_lossy()","sourceCodeStart":1919,"sourceCodeEnd":1955,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/file.rs#L1919-L1955","documentation":"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.","triggerScenarios":"Calling extract_archive(archive, dest, ExtractionFormat::Rar, opts), almost always because extension detection on a .rar release asset resolved the format to Rar.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// reject rar before downloading/extracting\nif archive.extension().is_some_and(|e| e.eq_ignore_ascii_case(\"rar\")) {\n    anyhow::bail!(\"unsupported asset format: rar; use a .tar.gz/.zip variant\");\n}","typeGuard":"fn is_supported_extract_format(f: ExtractionFormat) -> bool {\n    f != ExtractionFormat::Rar\n        && !matches!(f, ExtractionFormat::Gz | ExtractionFormat::Xz | ExtractionFormat::Bz2\n            | ExtractionFormat::Zst | ExtractionFormat::Br | ExtractionFormat::Lz4 | ExtractionFormat::Sz)\n}","tryCatchPattern":null,"preventionTips":["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"],"tags":["archive","extraction","rar","rust","mise"],"backgroundTag":"unsupported-archive-format","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}