jdx/mise · error
brew-cask:{}: {kind} terminate_process match must be name or
Error message
brew-cask:{}: {kind} terminate_process match must be name or full What it means
The optional `match` key of a `terminate_process` flight step controls whether `name` matches the process name or the full command line. Only the strings `"name"` and `"full"` are accepted; any other value (including non-strings like numbers or booleans) is rejected with this error.
Source
Thrown at src/system/packages/brew/cask/artifacts.rs:774
],
)?;
let name = object.get("name").and_then(Value::as_str).ok_or_else(|| {
eyre!(
"brew-cask:{}: {kind} terminate_process name must be a string",
cask.token
)
})?;
if name.is_empty() {
bail!(
"brew-cask:{}: {kind} terminate_process name must not be empty",
cask.token
);
}
let match_mode = match object.get("match") {
None => ProcessMatch::Name,
Some(Value::String(value)) if value == "name" => ProcessMatch::Name,
Some(Value::String(value)) if value == "full" => ProcessMatch::Full,
_ => bail!(
"brew-cask:{}: {kind} terminate_process match must be name or full",
cask.token
),
};
let sudo = parse_optional_flight_bool(cask, kind, object, "sudo", false)?;
let must_succeed =
parse_optional_flight_bool(cask, kind, object, "must_succeed", false)?;
let attempts = match object.get("attempts") {
None => 1,
Some(value) => value
.as_u64()
.and_then(|value| usize::try_from(value).ok())
.filter(|value| *value > 0)
.ok_or_else(|| {
eyre!(
"brew-cask:{}: {kind} terminate_process attempts must be a positive integer",
cask.token
)View on GitHub (pinned to afd2eddd3a)
Solutions
- Change `match` to exactly "name" (default, process-name match) or "full" (full command-line match).
- Remove the `match` key entirely to get the default `name` matching.
- Check spelling: "full_path" and "fullname" are not valid; only "name" and "full".
Example fix
// before [[install.flight_steps]] type = "terminate_process" name = "MyApp" match = "full_path" // after [[install.flight_steps]] type = "terminate_process" name = "MyApp" match = "full"
Defensive patterns
Strategy: validation
Validate before calling
const VALID_MATCH = new Set(['name', 'full']);
function validateMatch(step) {
if ('match' in step && !VALID_MATCH.has(step.match)) {
throw new Error(`terminate_process match must be 'name' or 'full', got ${JSON.stringify(step.match)}`);
}
} Type guard
const isValidMatch = (m) => m === undefined || m === 'name' || m === 'full';
Prevention
- Memorize the two allowed values: name (default) and full.
- Treat the absence of `match` as the default instead of guessing synonyms.
- Add lint/schema validation for cask files in CI.
When it happens
Trigger: A cask defines `match = "exe"`, `match = "path"`, `match = true`, or any value other than the literal strings "name" or "full" in a terminate_process step, and parse_flight_step hits the catch-all bail arm.
Common situations: Copy-pasting Homebrew Ruby cask semantics (which may use different match vocabulary) into mise cask definitions; typos like "fullpath" or "full_path"; accidentally quoting issues that produce unexpected types.
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:{}: unsupported {kind} sudo setting
- brew-cask:{}: unsupported {kind} run command base {}
- 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/f030bc9714f42199.
Report an issue: GitHub.