jdx/mise · error
brew-cask: : unsupported base
Error message
brew-cask:{}: unsupported {kind} {field} base What it means
A move/rename-style flight path object omitted the required "base" key. parse_flight_path requires an explicit "staged_path" base for move from/to paths; unlike run commands and guard paths, there is no literal default here.
Solutions
- Add "base": "staged_path" to each from/to path object of the move step.
- Ensure "base" is a JSON string, not null or an object.
- If a baseless path was intended, switch the step type to one that accepts literal paths (e.g. a run command).
Example fix
// before
{"type": "move", "from": {"path": "Old.app"}, "to": {"path": "New.app"}}
// after
{"type": "move", "from": {"base": "staged_path", "path": "Old.app"}, "to": {"base": "staged_path", "path": "New.app"}} Defensive patterns
Strategy: validation
Validate before calling
function requireMoveBase(p) {
if (typeof p?.base !== "string") {
throw new Error('move path requires "base": "staged_path"');
}
} Type guard
function isWellFormedMovePath(p) {
return typeof p === "object" && p !== null && typeof p.base === "string" && typeof p.path === "string";
} Try / catch
try {
parseFlightArtifact(caskJson);
} catch (err) {
if (String(err).includes("unsupported") && /base\s*"$|base"/.test(String(err)) && String(err).includes("move") === false) {
console.error('Move path object is missing "base": "staged_path"');
}
throw err;
} Prevention
- Always include the base key on move from/to path objects.
- Validate move steps with a schema requiring {base, path} pairs.
- Use a builder/serializer that emits base by default for move paths.
When it happens
Trigger: parse_flight_path (via FlightStep::Move / parse_flight_step) reads a from/to object like {"path": "Old.app"} with no "base" key, or with a non-string base.
Common situations: Hand-written move steps copied from the terser run-command style where base is optional, or JSON generated by tooling that drops defaults.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- brew-cask: : unsupported run guard condition
- brew-cask: : unsupported run guard platform
- brew-cask: : invalid run command path
- brew-cask: : unsupported field
- brew-cask: : unsupported base
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/f3d64e81834bd847.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/packages/brew/cask/artifacts.rs:1118
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 533346cc37)