jdx/mise · error · eyre::Report

brew-cask:{}: unsupported {kind} {field} base

Error message

brew-cask:{}: unsupported {kind} {field} base

What it means

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.

Source

Thrown at src/system/packages/brew/cask.rs:5865

    cask: &Cask,
    kind: &str,
    field: &str,
    value: Option<&Value>,
) -> Result<FlightPath> {
    let object = value.and_then(Value::as_object).ok_or_else(|| {
        eyre!(
            "brew-cask:{}: unsupported {kind} {field} metadata format",
            cask.token
        )
    })?;
    let base = match object.get("base").and_then(Value::as_str) {
        Some("staged_path") => FlightPathBase::StagedPath,
        Some(base) => bail!(
            "brew-cask:{}: unsupported {kind} {field} base {}",
            cask.token,
            base
        ),
        None => bail!("brew-cask:{}: unsupported {kind} {field} base", cask.token),
    };
    let path = object
        .get("path")
        .and_then(Value::as_str)
        .ok_or_else(|| eyre!("brew-cask:{}: unsupported {kind} {field} path", cask.token))?;
    if validate_flight_relative_path(path).is_err() {
        bail!(
            "brew-cask:{}: invalid {kind} {field} path {}",
            cask.token,
            path
        )
    }
    Ok(FlightPath {
        base,
        path: path.to_string(),
    })
}

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Update mise to the latest release — newer builds track Homebrew cask JSON schema changes
  2. Refresh Homebrew data and clear mise's cached cask JSON: `brew update && mise cache clear`, then retry the install
  3. Inspect the raw payload with `brew info --json=v2 --cask <token>` and confirm the artifact object actually has a "base" key
  4. 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
Defensive patterns

Strategy: type-guard

Type guard

fn is_supported_flight_path(v: &serde_json::Value) -> bool {
    let Some(obj) = v.as_object() else { return false };
    obj.get("base").and_then(serde_json::Value::as_str) == Some("staged_path")
        && obj.get("path").and_then(serde_json::Value::as_str).is_some()
}

Try / catch

match parse_flight_path(&value) {
    Ok(fp) => fp,
    Err(e) if e.to_string().contains("unsupported") && e.to_string().contains("base") => {
        warn!("skipping unsupported flight-path base in cask artifact");
        continue;
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/7722def3c4bb6e34. Report an issue: GitHub.