jdx/mise · error · eyre::Report

additional asset '{}' is not an archive

Error message

additional asset '{}' is not an archive

What it means

install_additional_archive() extracts a downloaded 'additional artifact' into the install dir. ExtractionFormat::from_file_name() infers the format from the file's name; if it is not a recognized archive type (tar/zip/gz/xz/zst/...), mise cannot extract it and bails instead of guessing.

Source

Thrown at src/backend/github.rs:1620

                );
            }
        } else if Settings::get().lockfile_enabled() {
            artifact.size = Some(file_path.metadata()?.len());
        }
        Ok(())
    }

    fn install_additional_archive(
        &self,
        install_path: &Path,
        file_path: &Path,
        pr: Option<&dyn crate::ui::progress_report::SingleReport>,
    ) -> Result<()> {
        let format = file::ExtractionFormat::from_file_name(
            &file_path.file_name().unwrap_or_default().to_string_lossy(),
        );
        if !format.is_archive() {
            eyre::bail!(
                "additional asset '{}' is not an archive",
                file_path.display()
            );
        }
        let extract_opts = file::ExtractOptions {
            pr,
            ..Default::default()
        };
        file::extract_archive(file_path, install_path, format, &extract_opts)
    }

    /// Discovers bin paths in the installation directory
    fn discover_bin_paths(&self, tv: &ToolVersion) -> Result<Vec<std::path::PathBuf>> {
        let raw_opts = tv.request.options();
        let opts = self.options(&raw_opts);
        if let Some(bin_path_template) = opts.bin_path() {
            let bin_path = template_string(&bin_path_template, tv);
            return Ok(vec![tv.install_path().join(&bin_path)]);

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. Narrow the additional_artifacts pattern so it only matches actual archives (e.g. "mytool-docs.tar.gz" instead of ".*")
  2. Explicitly exclude non-archive sidecar files (checksums/signatures) from the pattern
  3. Verify against the release page which files the pattern matches before committing it

Example fix

# before (mise.toml)
[tools.mytool]
version = "1.0"
additional_artifacts = [".*"]
# after
additional_artifacts = ["mytool-.*-docs\\.tar\\.gz"]
Defensive patterns

Strategy: validation

Validate before calling

# dry-check what your pattern matches against the release before committing it
curl -s https://api.github.com/repos/<owner>/<repo>/releases/latest | jq -r '.assets[].name' | grep -E '<your-pattern>'

Prevention

When it happens

Trigger: An `additional_artifacts` glob/pattern for a github: tool matches a non-archive release asset — e.g. SHA256SUMS, a .sig signature file, a raw binary, or a .txt — and mise tries to extract it after download.

Common situations: Overly broad patterns like `additional_artifacts = [".*"]` or `"*checksums*"` meant to grab one archive but also matching release metadata files; releases that mix archives and plain files with similar names.

Related errors


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/ecf038797c23e05b. Report an issue: GitHub.