{"record":{"id":"7722def3c4bb6e34","repo":"jdx/mise","slug":"brew-cask-unsupported-kind-field-base-7722de","errorCode":null,"errorMessage":"brew-cask:{}: unsupported {kind} {field} base","messagePattern":"brew-cask:(.+?): unsupported (.+?) (.+?) base","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask.rs","lineNumber":5865,"sourceCode":"    cask: &Cask,\n    kind: &str,\n    field: &str,\n    value: Option<&Value>,\n) -> Result<FlightPath> {\n    let object = value.and_then(Value::as_object).ok_or_else(|| {\n        eyre!(\n            \"brew-cask:{}: unsupported {kind} {field} metadata format\",\n            cask.token\n        )\n    })?;\n    let base = match object.get(\"base\").and_then(Value::as_str) {\n        Some(\"staged_path\") => FlightPathBase::StagedPath,\n        Some(base) => bail!(\n            \"brew-cask:{}: unsupported {kind} {field} base {}\",\n            cask.token,\n            base\n        ),\n        None => bail!(\"brew-cask:{}: unsupported {kind} {field} base\", cask.token),\n    };\n    let path = object\n        .get(\"path\")\n        .and_then(Value::as_str)\n        .ok_or_else(|| eyre!(\"brew-cask:{}: unsupported {kind} {field} path\", cask.token))?;\n    if validate_flight_relative_path(path).is_err() {\n        bail!(\n            \"brew-cask:{}: invalid {kind} {field} path {}\",\n            cask.token,\n            path\n        )\n    }\n    Ok(FlightPath {\n        base,\n        path: path.to_string(),\n    })\n}\n","sourceCodeStart":5847,"sourceCodeEnd":5883,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/packages/brew/cask.rs#L5847-L5883","documentation":"While parsing a cask's structured 'flight path' artifact metadata (a JSON object with 'base' and 'path' keys, identified by {kind}/{field}, e.g. a binary or installer stanza), mise requires base == \"staged_path\". This bail is the None arm: the object exists but has no \"base\" key at all. It means the cask JSON comes from a Homebrew version whose schema this mise build does not understand, so mise refuses to guess where the flight path is anchored.","triggerScenarios":"Installing or upgrading a cask whose artifact JSON (from `brew info --json=v2 --cask <token>` or Homebrew's API/caskroom metadata) contains a flight-path object with a missing 'base' key — e.g. a newer Homebrew renamed or made the field optional.","commonSituations":"Homebrew schema drift after `brew update` on a machine running an older mise; stale or truncated cached cask JSON in mise's cache; third-party taps emitting non-standard artifact objects.","solutions":["Update mise to the latest release — newer builds track Homebrew cask JSON schema changes","Refresh Homebrew data and clear mise's cached cask JSON: `brew update && mise cache clear`, then retry the install","Inspect the raw payload with `brew info --json=v2 --cask <token>` and confirm the artifact object actually has a \"base\" key","Install the cask with `brew install --cask <token>` directly instead of mise-managed casks, or (fork maintainers) add the new base variant to the match in src/system/packages/brew/cask.rs:5862"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":"fn is_supported_flight_path(v: &serde_json::Value) -> bool {\n    let Some(obj) = v.as_object() else { return false };\n    obj.get(\"base\").and_then(serde_json::Value::as_str) == Some(\"staged_path\")\n        && obj.get(\"path\").and_then(serde_json::Value::as_str).is_some()\n}","tryCatchPattern":"match parse_flight_path(&value) {\n    Ok(fp) => fp,\n    Err(e) if e.to_string().contains(\"unsupported\") && e.to_string().contains(\"base\") => {\n        warn!(\"skipping unsupported flight-path base in cask artifact\");\n        continue;\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Pin Homebrew data freshness by running brew update alongside mise updates so schema drift is caught early","Clear mise's brew cask cache after Homebrew major upgrades","Validate cask JSON shape with brew info --json=v2 before scripting installs against it"],"tags":["brew-cask","homebrew","metadata","json","schema"],"backgroundTag":"unsupported-metadata-format","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-22T04:17:13.399Z"}