jdx/mise · error
brew-cask:{}: unsupported {kind} {field} base
Error message
brew-cask:{}: unsupported {kind} {field} base What it means
For move/rename-style cask path fields, `base` is required: unlike contextual guard paths there is no literal/relative default. This error fires when the path object omits `base` (or it isn't a string).
Source
Thrown at src/system/packages/brew/cask/artifacts.rs:1076
cask: &Cask,
kind: &str,
field: &str,
value: Option<&Value>,
) -> Result<FlightPath> {
let object = value.and_then(Value::as_object).ok_or_else(|| {
eyre!(
"brew-cask:{}: unsupported {kind} {field} metadata format",
cask.token
)
})?;
let base = match object.get("base").and_then(Value::as_str) {
Some("staged_path") => FlightPathBase::StagedPath,
Some(base) => bail!(
"brew-cask:{}: unsupported {kind} {field} base {}",
cask.token,
base
),
None => bail!("brew-cask:{}: unsupported {kind} {field} base", cask.token),
};
let path = object
.get("path")
.and_then(Value::as_str)
.ok_or_else(|| eyre!("brew-cask:{}: unsupported {kind} {field} path", cask.token))?;
if validate_flight_relative_path(path).is_err() {
bail!(
"brew-cask:{}: invalid {kind} {field} path {}",
cask.token,
path
)
}
Ok(FlightPath {
base,
path: path.to_string(),
})
}
View on GitHub (pinned to afd2eddd3a)
Solutions
- Add "base": "staged_path" to the path object.
- Ensure `base` is a JSON string, not a nested object or null.
- Compare with a working Homebrew cask `move` stanza and mirror its structure.
- Validate the stanza JSON before install to catch the missing key early.
Example fix
// before
{ "path": "Foo.app" }
// after
{ "base": "staged_path", "path": "Foo.app" } Defensive patterns
Strategy: validation
Validate before calling
function movePathHasBase(p) {
return typeof p === "object" && p !== null && typeof p.base === "string" && p.base.length > 0;
} Try / catch
try {
installCask(token);
} catch (e) {
if (String(e).includes("base") && String(e).endsWith(`base"`) === false && String(e).includes("base\",")) {
// missing-value variant
console.warn(`Cask ${token} move path is missing its base`);
} else throw e;
} Prevention
- Treat base as required for move path objects
- Schema-validate cask JSON requiring base on move paths
- Regenerate converted casks with tooling that emits base
When it happens
Trigger: A cask move artifact path object like {"path":"Foo.app"} with no `base` key, or `base` set to a non-string value.
Common situations: Hand-written cask stanzas omitting the mandatory base, converted casks from tooling that strips base, and authors assuming path is relative by default as in guard paths.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- brew-cask:{}: unsupported {kind} run guard condition
- brew-cask:{}: unsupported {kind} run guard platform
- brew-cask:{}: unsupported {kind} run guard condition {}
- brew-cask:{}: unsupported {kind} {field} base {}
- brew-cask:{}: unsupported {kind} {context} field {}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/f3d64e81834bd847.
Report an issue: GitHub.