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
Thrown while parsing a terminate_process step. The optional 'match' key selects how the process name is compared: omitted defaults to 'name' (match by process name), 'name' and 'full' (match the full executable path) are the only accepted spellings; anything else bails.
Source
Thrown at src/system/packages/brew/cask.rs:5730
],
)?;
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 6f52dcdf99)
Solutions
- Use "match": "name" (or omit the key) to match by process name
- Use "match": "full" to match the complete executable path
Example fix
// before
{"type": "terminate_process", "name": "/Applications/Zoom.app/Contents/MacOS/zoom.us", "match": "path"}
// after
{"type": "terminate_process", "name": "/Applications/Zoom.app/Contents/MacOS/zoom.us", "match": "full"} Defensive patterns
Strategy: validation
Validate before calling
fn match_mode_ok(step: &serde_json::Value) -> bool {
match step.get("match") {
None => true,
Some(serde_json::Value::String(s)) => s == "name" || s == "full",
Some(_) => false,
}
} Type guard
fn is_valid_match(v: &serde_json::Value) -> bool {
v.as_str().map(|s| s == "name" || s == "full").unwrap_or(false)
} Try / catch
match parse_flight_step(&cask, kind, &step) {
Ok(step) => { /* proceed */ }
Err(e) if e.to_string().contains("match must be name or full") => {
eprintln!("terminate_process match accepts only 'name' or 'full'");
}
Err(e) => return Err(e),
} Prevention
- Default to omitting 'match' — name matching covers most cases
- Use 'full' only with the complete executable path in 'name'
When it happens
Trigger: {"type": "terminate_process", "name": "x", "match": "exact"} — values like "regex", "partial", "path", or a non-string match value all land in the wildcard arm and bail.
Common situations: Assuming Homebrew's audit vocabulary or pgrep semantics (e.g. "-f" or "full_path"); typos like "FullName"; copying match syntax from a different tool's config.
Related errors
- brew-cask:{}: {kind} terminate_process name must not be empt
- brew-cask:{}: {kind} terminate_process notices must be an ar
- brew-cask:{}: {kind} terminate_process failure_message must
- brew-cask:{}: unsupported {kind} step type {}
- brew-cask:{}: unsupported {kind} sudo setting
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/4ce02a4a4bcf8e2b.
Report an issue: GitHub.