{"record":{"id":"a90866c084e27d3c","repo":"jdx/mise","slug":"format-format-not-supported","errorCode":null,"errorMessage":"{format} format not supported","messagePattern":"(.+?) format not supported","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/file.rs","lineNumber":1783,"sourceCode":"        }\n        _ => f(),\n    }\n}\n\npub fn decompress_file(input: &Path, dest: &Path, format: ExtractionFormat) -> Result<()> {\n    if let Some(parent) = dest.parent()\n        && !parent.as_os_str().is_empty()\n    {\n        create_dir_all(parent)?;\n    }\n\n    run_blocking(|| match format {\n        ExtractionFormat::Gz => un_gz(input, dest),\n        ExtractionFormat::Xz => un_xz(input, dest),\n        ExtractionFormat::Zst => un_zst(input, dest),\n        ExtractionFormat::Bz2 => un_bz2(input, dest),\n        ExtractionFormat::Br | ExtractionFormat::Lz4 | ExtractionFormat::Sz => {\n            bail!(\"{format} format not supported\")\n        }\n        _ => bail!(\"unsupported compressed file format: {}\", format),\n    })\n}\n\n#[derive(Debug, Clone, Copy, PartialEq, strum::EnumString, strum::Display)]\npub enum ExtractionFormat {\n    #[strum(to_string = \"tar.gz\", serialize = \"tgz\")]\n    TarGz,\n    #[strum(serialize = \"gz\")]\n    Gz,\n    #[strum(to_string = \"tar.xz\", serialize = \"txz\")]\n    TarXz,\n    #[strum(serialize = \"xz\")]\n    Xz,\n    #[strum(to_string = \"tar.bz2\", serialize = \"tbz2\", serialize = \"tbz\")]\n    TarBz2,\n    #[strum(serialize = \"bz2\")]","sourceCodeStart":1765,"sourceCodeEnd":1801,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/file.rs#L1765-L1801","documentation":"`file::decompress_file` (src/file.rs:1770) handles single-file (non-container) decompression for gz, xz, zst, and bz2. The `Br | Lz4 | Sz` arms exist because those variants exist in `ExtractionFormat`, but no single-file decoder is wired in for them, so they bail explicitly with the format name instead of mis-extracting.","triggerScenarios":"A tool asset whose detected extraction format is `.br`, `.lz4`, or `.sz` reaching the single-file decompression path — e.g. a custom backend or tool definition pointing at a raw brotli/lz4/snappy asset rather than a `tar.*` container or supported bare compression.","commonSituations":"Custom tool definitions referencing upstream releases shipped as `.tar.br`/`.lz4`; assuming mise supports every format the enum names; registry/aqua-style assets published in less common compressions.","solutions":["Use an artifact in a supported compression: `.tar.gz`, `.tar.xz`, `.tar.zst`, `.tar.bz2`, bare `.gz/.xz/.zst/.bz2`, or `.zip`","Pick a differently-compressed release asset if the project publishes one","Install such tools outside mise's extraction (download and `brotli -d`/`lz4 -d` yourself) and reference the binary via a custom backend that skips mise's archive handling"],"exampleFix":"# before (custom tool def)\nurl = \"https://example.com/darwin/tool.lz4\"\n# after\nurl = \"https://example.com/darwin/tool.tar.gz\"","handlingStrategy":"validation","validationCode":"// check the format before calling decompress_file\nuse file::ExtractionFormat;\nfn single_file_supported(f: ExtractionFormat) -> bool {\n    matches!(f, ExtractionFormat::Gz | ExtractionFormat::Xz | ExtractionFormat::Zst | ExtractionFormat::Bz2)\n}","typeGuard":"fn is_supported_single_file(name: &str) -> bool {\n    [\".gz\", \".xz\", \".zst\", \".bz2\"].iter().any(|e| name.ends_with(e))\n        && ![\".tar.\"].iter().any(|e| name.contains(e))\n}","tryCatchPattern":"Match the `{format} format not supported` bail; on Br/Lz4/Sz, fall back to shelling out to `brotli`/`lz4`/`snzip` (or pick another asset) instead of failing the install.","preventionTips":["Publish/consume release assets in tar.gz/tar.xz/tar.zst/tar.bz2 or zip","Check the asset list of a tool before writing a custom backend for it","Keep an extraction-format allowlist in your tooling config"],"tags":["mise","archive","compression","install","backend"],"backgroundTag":"unsupported-archive-format","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}