jdx/mise · error
brew-cask: pkg installer choices are not supported yet
Error message
brew-cask: pkg installer choices are not supported yet
What it means
Thrown by parse_pkg_artifact. mise supports a cask 'pkg' artifact as a single string (the normal Homebrew DSL) and additionally tolerates a one-element array, but a pkg array with more than one entry would imply multiple installer pkgs or installer choices, which the installer flow cannot execute, so it bails instead of silently installing only part of the set.
Source
Thrown at src/system/packages/brew/cask.rs:5219
target: artifact_target(value, values),
content,
executable,
args,
env,
}))
}
fn parse_pkg_artifact(value: &Value) -> Result<Option<PkgArtifact>> {
let Some(pkg) = value.as_object().and_then(|o| o.get("pkg")) else {
return Ok(None);
};
match pkg {
Value::String(source) => Ok(Some(PkgArtifact {
source: source.clone(),
})),
Value::Array(values) => {
if values.len() > 1 {
bail!("brew-cask: pkg installer choices are not supported yet");
}
Ok(values
.first()
.and_then(Value::as_str)
.map(|source| PkgArtifact {
source: source.to_string(),
}))
}
_ => Ok(None),
}
}
fn parse_installer_artifact(value: &Value) -> Result<Option<InstallerArtifact>> {
let Some(installer) = value.as_object().and_then(|object| object.get("installer")) else {
return Ok(None);
};
let values = installer
.as_array()View on GitHub (pinned to 6f52dcdf99)
Solutions
- Reduce the pkg stanza to a single string: {"pkg": "a.pkg"}
- If multiple pkgs are genuinely required, split them into separate installer stanzas or install the extra pkgs outside mise
- File an upstream issue with mise (include the cask token) if a real Homebrew cask needs multi-pkg support
Example fix
// before
{"artifact": {"pkg": ["Installer.pkg", "Extras.pkg"]}}
// after
{"artifact": {"pkg": "Installer.pkg"}} Defensive patterns
Strategy: validation
Validate before calling
fn pkg_artifact_ok(v: &serde_json::Value) -> bool {
match v.get("pkg") {
Some(serde_json::Value::String(_)) => true,
Some(serde_json::Value::Array(a)) => a.len() <= 1,
_ => true,
}
} Type guard
fn is_supported_pkg(v: &serde_json::Value) -> bool {
matches!(v, serde_json::Value::String(_))
|| matches!(v, serde_json::Value::Array(a) if a.len() == 1 && a[0].is_string())
} Try / catch
match parse_pkg_artifact(&artifact) {
Ok(pkg) => { /* proceed */ }
Err(e) if e.to_string().contains("pkg installer choices") => {
eprintln!("multiple pkg installers are unsupported; split into separate installer stanzas");
}
Err(e) => return Err(e),
} Prevention
- Write pkg as a single string, matching Homebrew's own DSL
- Never emit multi-element pkg arrays from cask generators
- Audit custom casks for array-valued pkg stanzas before installing with mise
When it happens
Trigger: An artifact object whose "pkg" key is an array with length > 1, e.g. {"artifact": {"pkg": ["a.pkg", "b.pkg"]}}, processed while mise parses cask artifacts for install/uninstall.
Common situations: Custom cask JSON listing several .pkg installers under one stanza; tooling that always emits arrays instead of scalar strings; Homebrew casks that use uncommon multi-pkg layouts.
Related errors
- brew-cask: command_wrapper '{}' must set exactly one of cont
- brew-cask:{}: unsupported artifact type {}
- brew-cask: command_wrapper args and env require executable
- brew-cask: unsupported {context} field {}
- brew-cask: generate_completions_from_executable requires an
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/9a85856208a545ef.
Report an issue: GitHub.