{"record":{"id":"8edad4020c8b2201","repo":"jdx/mise","slug":"brew-cask-unsupported-kind-field-base-8edad4","errorCode":null,"errorMessage":"brew-cask:{}: unsupported {kind} {field} base {}","messagePattern":"brew-cask:(.+?): unsupported (.+?) (.+?) base (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask/artifacts.rs","lineNumber":1005,"sourceCode":"    }\n}\n\npub(super) fn parse_context_flight_path(\n    cask: &Cask,\n    kind: &str,\n    field: &str,\n    object: &serde_json::Map<String, Value>,\n) -> Result<FlightPath> {\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    let base = match object.get(\"base\").and_then(Value::as_str) {\n        Some(\"staged_path\") => FlightPathBase::StagedPath,\n        Some(\"appdir\") => FlightPathBase::AppDir,\n        Some(\"homebrew_prefix\") => FlightPathBase::HomebrewPrefix,\n        Some(\"relative\") => FlightPathBase::Literal,\n        Some(base) => bail!(\n            \"brew-cask:{}: unsupported {kind} {field} base {}\",\n            cask.token,\n            base\n        ),\n        None => FlightPathBase::Literal,\n    };\n    Ok(FlightPath {\n        base,\n        path: path.to_string(),\n    })\n}\n\npub(super) fn parse_context_flight_path_value(\n    cask: &Cask,\n    kind: &str,\n    field: &str,\n    value: Option<&Value>,\n) -> Result<FlightPath> {","sourceCodeStart":987,"sourceCodeEnd":1023,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/packages/brew/cask/artifacts.rs#L987-L1023","documentation":"When resolving a contextual cask path (e.g. an if_exists/unless_exists run-guard path), the optional `base` key selects the root the path is relative to. Supported values are `staged_path`, `appdir`, `homebrew_prefix`, and `relative` (or omitted). Any other `base` string triggers this error.","triggerScenarios":"A cask stanza's contextual path object contains {\"base\":\"<unknown>\",\"path\":\"...\"} with a base like `app`, `HOMEBREW_PREFIX`, `caskroom`, or another value outside the four supported ones.","commonSituations":"Casks authored against Homebrew DSL bases this tool doesn't map, typos such as \"staged path\" or \"staged_path \" (whitespace/case), and custom-tap casks using esoteric base names.","solutions":["Change `base` to one of: \"staged_path\", \"appdir\", \"homebrew_prefix\", or \"relative\".","Remove `base` entirely to use the default (literal/relative) interpretation.","Fix casing/typo issues (values are lowercase with underscores, e.g. `homebrew_prefix`).","If the cask needs an unmapped Homebrew base, remove the guarded artifact or request support upstream."],"exampleFix":"// before\n{ \"condition\": \"if_exists\", \"base\": \"app\", \"path\": \"Foo.app\" }\n// after\n{ \"condition\": \"if_exists\", \"base\": \"appdir\", \"path\": \"Foo.app\" }","handlingStrategy":"validation","validationCode":"const BASES = new Set([\"staged_path\", \"appdir\", \"homebrew_prefix\", \"relative\"]);\nfunction hasSupportedBase(pathObj) {\n  return pathObj?.base === undefined || BASES.has(pathObj.base);\n}","typeGuard":"function hasKnownBase(p: { base?: string }): p is { base: \"staged_path\" | \"appdir\" | \"homebrew_prefix\" | \"relative\" } {\n  return p.base === undefined || [\"staged_path\",\"appdir\",\"homebrew_prefix\",\"relative\"].includes(p.base);\n}","tryCatchPattern":"try {\n  installCask(token);\n} catch (e) {\n  if (String(e).includes(\"base\")) {\n    console.warn(`Cask ${token} uses an unsupported path base; skipping`);\n  } else throw e;\n}","preventionTips":["Use only staged_path/appdir/homebrew_prefix/relative as base values","Omit base for literal relative paths","Keep custom taps aligned with the Homebrew DSL base vocabulary"],"tags":["homebrew","cask","parsing","unsupported-value"],"backgroundTag":"invalid-enum-value","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}