jdx/mise · error
brew-cask: : unsupported archive type for
Error message
brew-cask:{}: unsupported archive type for {} What it means
The brew-cask fetcher staged a cask artifact whose download format is neither one of the handled archive types nor recognized as a supported archive at all. When the format fails the `is_archive()` check and no direct staging path applies, extraction cannot proceed, so the fetch aborts with this error naming the cask token and file. It protects users from attempting to unpack an unknown binary or container format.
Solutions
- Check the cask definition (`token`, `url`, artifact stanzas) and confirm the artifact format is one the fetcher supports
- Update the cask definition or fetcher to a version that supports the new archive format
- Verify the downloaded file's actual type (`file <filename>`) and fix the cask to point at a supported archive
- If the artifact is a plain executable rather than an archive, adjust the cask stanza so it is staged directly instead of extracted
Example fix
// before: cask expects a zip but upstream now ships a .pkg url "https://example.com/app.pkg" // after: point at the still-published supported archive url "https://example.com/app.zip"
Defensive patterns
Strategy: validation
Validate before calling
let known = ["zip", "tar.gz", "tgz", "tar.bz2", "dmg", "tar.xz"];
if !known.iter().any(|ext| filename.ends_with(ext)) {
eprintln!("skip {}: unsupported archive format", filename);
} Type guard
fn is_supported_archive(filename: &str) -> bool {
matches!(filename.rsplit('.').next(), Some("zip") | Some("gz") | Some("bz2") | Some("xz") | Some("dmg"))
} Prevention
- Keep cask definitions pinned to artifacts with known, supported formats
- Run `file` on the downloaded artifact before staging in CI
- Watch upstream release notes for artifact-format changes
When it happens
Trigger: Cask `url` points to a file whose format (from extension or detected type) is not in the supported archive set and is not a plain staged file; upstream changed the distribution artifact to a new container format; a cask stanza mislabels the artifact so the fetcher picks the wrong extraction branch in `extract_archive`.
Common situations: A cask recipe references a `.pkg`/`.dmg` variant or a new compression format the fetcher doesn't recognize; an upstream release swapped its artifact format between versions; a hand-edited cask definition names the wrong file.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- brew-cask: : unsupported archive type for
- extract_archive does not support compressed single-file…
- additional asset ' ' is not an archive
- brew-cask: nested archive depth exceeds
- command failed: #
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/b396c4b811c58a38.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/packages/brew/cask/fetch.rs:290
.and_then(|f| f.to_str())
.unwrap_or_default();
if is_dmg_archive(archive, filename)? {
file::un_dmg(archive, &extract_dir)?;
} else {
let format = cask_extraction_format(archive, filename)?;
if format == ExtractionFormat::Raw {
// A direct pkg download may have an opaque URL path while the response's
// Content-Disposition and the cask artifact supply its real name. Stage
// XAR installers under the declared artifact name; other raw downloads
// are executable binaries and retain the original URL filename.
let (stage_filename, executable) = raw_cask_artifact_name(cask, archive, filename)?;
let dest = extract_dir.join(stage_filename);
file::copy(archive, &dest)?;
if executable {
file::make_executable(&dest)?;
}
} else if !format.is_archive() {
bail!(
"brew-cask:{}: unsupported archive type for {}",
cask.token,
filename
);
} else {
file::extract_archive(
archive,
&extract_dir,
format,
&ExtractOptions {
pr,
..Default::default()
},
)?;
}
}
extract_nested_cask_archives(&extract_dir, pr)?;
Ok(extract_dir)View on GitHub (pinned to 533346cc37)