{"record":{"id":"01a8fabbb10f9873","repo":"jdx/mise","slug":"brew-cask-unsupported-kind-run-command-base-01a8fa","errorCode":null,"errorMessage":"brew-cask:{}: unsupported {kind} run command base {}","messagePattern":"brew-cask:(.+?): unsupported (.+?) run command base (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask/artifacts.rs","lineNumber":911,"sourceCode":") -> Result<FlightPath> {\n    let object = value.and_then(Value::as_object).ok_or_else(|| {\n        eyre!(\n            \"brew-cask:{}: unsupported {kind} run command metadata format\",\n            cask.token\n        )\n    })?;\n    reject_unsupported_flight_fields(cask, kind, \"run command\", object, &[\"base\", \"path\"])?;\n    let path = object.get(\"path\").and_then(Value::as_str).ok_or_else(|| {\n        eyre!(\n            \"brew-cask:{}: unsupported {kind} run command path\",\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(\"appdir\") => FlightPathBase::AppDir,\n        Some(\"homebrew_prefix\") => FlightPathBase::HomebrewPrefix,\n        Some(base) => bail!(\n            \"brew-cask:{}: unsupported {kind} run command base {}\",\n            cask.token,\n            base\n        ),\n        None => FlightPathBase::Literal,\n    };\n    let path_value = Path::new(path);\n    let invalid_absolute_path = base == FlightPathBase::Literal\n        && !path_value.is_absolute()\n        && path_value.components().count() > 1;\n    let invalid_based_path = matches!(\n        base,\n        FlightPathBase::StagedPath | FlightPathBase::AppDir | FlightPathBase::HomebrewPrefix\n    ) && (path_value.is_absolute()\n        || path_value\n            .components()\n            .any(|component| matches!(component, Component::ParentDir)));\n    if invalid_absolute_path || invalid_based_path {","sourceCodeStart":893,"sourceCodeEnd":929,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/packages/brew/cask/artifacts.rs#L893-L929","documentation":"A `run` flight step's `command.base` selects what relative paths resolve against. Only \"staged_path\", \"appdir\", \"homebrew_prefix\", or absent (literal) are accepted; any other string base is rejected with this error naming the bad base.","triggerScenarios":"A cask sets `command = { base = \"app\", path = \"...\" }` or `base = \"pkgdir\"` in a Run step; parse_run_command's `Some(base)` bail arm fires for an unrecognized base string.","commonSituations":"Copy-pasting Homebrew cask `base`/`staged` DSL values that mise names differently; typos like \"stagedpath\" or \"AppDir\" (case-sensitive); inventing bases expecting them to resolve like Homebrew's artifact dirs.","solutions":["Use one of the accepted bases: \"staged_path\", \"appdir\", or \"homebrew_prefix\".","Remove `base` entirely if the path is already absolute/literal.","Fix casing — values are lowercase snake_case."],"exampleFix":"// before\n[[install.flight_steps]]\ntype = \"run\"\ncommand = { base = \"pkgdir\", path = \"tools/setup.sh\" }\n// after\n[[install.flight_steps]]\ntype = \"run\"\ncommand = { base = \"staged_path\", path = \"tools/setup.sh\" }","handlingStrategy":"validation","validationCode":"const VALID_BASES = new Set(['staged_path', 'appdir', 'homebrew_prefix']);\nfunction validateRunBase(cmd) {\n  if ('base' in cmd && !VALID_BASES.has(cmd.base)) {\n    throw new Error(`unsupported run command base: ${cmd.base}`);\n  }\n}","typeGuard":"const isValidBase = (b) => b === undefined || VALID_BASES.has(b);","tryCatchPattern":null,"preventionTips":["Use only staged_path / appdir / homebrew_prefix; omit `base` for literal paths.","Snake_case and lowercase only — no \"AppDir\" or \"stagedpath\".","Reference mise's cask artifact docs when translating Homebrew stanzas."],"tags":["brew-cask","config-validation","run-command","enum-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-14T00:17:10.932Z"}