{"record":{"id":"f3d64e81834bd847","repo":"jdx/mise","slug":"brew-cask-unsupported-kind-field-base-f3d64e","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":1076,"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":1058,"sourceCodeEnd":1094,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/packages/brew/cask/artifacts.rs#L1058-L1094","documentation":"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).","triggerScenarios":"A cask move artifact path object like {\"path\":\"Foo.app\"} with no `base` key, or `base` set to a non-string value.","commonSituations":"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.","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."],"exampleFix":"// before\n{ \"path\": \"Foo.app\" }\n// after\n{ \"base\": \"staged_path\", \"path\": \"Foo.app\" }","handlingStrategy":"validation","validationCode":"function movePathHasBase(p) {\n  return typeof p === \"object\" && p !== null && typeof p.base === \"string\" && p.base.length > 0;\n}","typeGuard":null,"tryCatchPattern":"try {\n  installCask(token);\n} catch (e) {\n  if (String(e).includes(\"base\") && String(e).endsWith(`base\"`) === false && String(e).includes(\"base\\\",\")) {\n    // missing-value variant\n    console.warn(`Cask ${token} move path is missing its base`);\n  } else throw e;\n}","preventionTips":["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"],"tags":["homebrew","cask","parsing","missing-field"],"backgroundTag":"missing-required-argument","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}