jdx/mise · error
brew-cask:{}: unsupported {kind} run command base {}
Error message
brew-cask:{}: unsupported {kind} run command base {} What it means
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.
Source
Thrown at src/system/packages/brew/cask/artifacts.rs:911
) -> Result<FlightPath> {
let object = value.and_then(Value::as_object).ok_or_else(|| {
eyre!(
"brew-cask:{}: unsupported {kind} run command metadata format",
cask.token
)
})?;
reject_unsupported_flight_fields(cask, kind, "run command", object, &["base", "path"])?;
let path = object.get("path").and_then(Value::as_str).ok_or_else(|| {
eyre!(
"brew-cask:{}: unsupported {kind} run command path",
cask.token
)
})?;
let base = match object.get("base").and_then(Value::as_str) {
Some("staged_path") => FlightPathBase::StagedPath,
Some("appdir") => FlightPathBase::AppDir,
Some("homebrew_prefix") => FlightPathBase::HomebrewPrefix,
Some(base) => bail!(
"brew-cask:{}: unsupported {kind} run command base {}",
cask.token,
base
),
None => FlightPathBase::Literal,
};
let path_value = Path::new(path);
let invalid_absolute_path = base == FlightPathBase::Literal
&& !path_value.is_absolute()
&& path_value.components().count() > 1;
let invalid_based_path = matches!(
base,
FlightPathBase::StagedPath | FlightPathBase::AppDir | FlightPathBase::HomebrewPrefix
) && (path_value.is_absolute()
|| path_value
.components()
.any(|component| matches!(component, Component::ParentDir)));
if invalid_absolute_path || invalid_based_path {View on GitHub (pinned to afd2eddd3a)
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.
Example fix
// before
[[install.flight_steps]]
type = "run"
command = { base = "pkgdir", path = "tools/setup.sh" }
// after
[[install.flight_steps]]
type = "run"
command = { base = "staged_path", path = "tools/setup.sh" } Defensive patterns
Strategy: validation
Validate before calling
const VALID_BASES = new Set(['staged_path', 'appdir', 'homebrew_prefix']);
function validateRunBase(cmd) {
if ('base' in cmd && !VALID_BASES.has(cmd.base)) {
throw new Error(`unsupported run command base: ${cmd.base}`);
}
} Type guard
const isValidBase = (b) => b === undefined || VALID_BASES.has(b);
Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- brew-cask:{}: {kind} terminate_process match must be name or
- brew-cask:{}: unsupported {kind} sudo setting
- brew-cask:{}: unsupported {kind} run guard platform {}
- brew-cask: command_wrapper '{}' must set exactly one of cont
- brew-cask: command_wrapper args and env require executable
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/01a8fabbb10f9873.
Report an issue: GitHub.