{"record":{"id":"f030bc9714f42199","repo":"jdx/mise","slug":"brew-cask-kind-terminate-process-match-must-f030bc","errorCode":null,"errorMessage":"brew-cask:{}: {kind} terminate_process match must be name or full","messagePattern":"brew-cask:(.+?): (.+?) terminate_process match must be name or full","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask/artifacts.rs","lineNumber":774,"sourceCode":"                ],\n            )?;\n            let name = object.get(\"name\").and_then(Value::as_str).ok_or_else(|| {\n                eyre!(\n                    \"brew-cask:{}: {kind} terminate_process name must be a string\",\n                    cask.token\n                )\n            })?;\n            if name.is_empty() {\n                bail!(\n                    \"brew-cask:{}: {kind} terminate_process name must not be empty\",\n                    cask.token\n                );\n            }\n            let match_mode = match object.get(\"match\") {\n                None => ProcessMatch::Name,\n                Some(Value::String(value)) if value == \"name\" => ProcessMatch::Name,\n                Some(Value::String(value)) if value == \"full\" => ProcessMatch::Full,\n                _ => bail!(\n                    \"brew-cask:{}: {kind} terminate_process match must be name or full\",\n                    cask.token\n                ),\n            };\n            let sudo = parse_optional_flight_bool(cask, kind, object, \"sudo\", false)?;\n            let must_succeed =\n                parse_optional_flight_bool(cask, kind, object, \"must_succeed\", false)?;\n            let attempts = match object.get(\"attempts\") {\n                None => 1,\n                Some(value) => value\n                    .as_u64()\n                    .and_then(|value| usize::try_from(value).ok())\n                    .filter(|value| *value > 0)\n                    .ok_or_else(|| {\n                        eyre!(\n                            \"brew-cask:{}: {kind} terminate_process attempts must be a positive integer\",\n                            cask.token\n                        )","sourceCodeStart":756,"sourceCodeEnd":792,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/packages/brew/cask/artifacts.rs#L756-L792","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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\"."],"exampleFix":"// before\n[[install.flight_steps]]\ntype = \"terminate_process\"\nname = \"MyApp\"\nmatch = \"full_path\"\n// after\n[[install.flight_steps]]\ntype = \"terminate_process\"\nname = \"MyApp\"\nmatch = \"full\"","handlingStrategy":"validation","validationCode":"const VALID_MATCH = new Set(['name', 'full']);\nfunction validateMatch(step) {\n  if ('match' in step && !VALID_MATCH.has(step.match)) {\n    throw new Error(`terminate_process match must be 'name' or 'full', got ${JSON.stringify(step.match)}`);\n  }\n}","typeGuard":"const isValidMatch = (m) => m === undefined || m === 'name' || m === 'full';","tryCatchPattern":null,"preventionTips":["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."],"tags":["brew-cask","config-validation","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-14T05:17:10.506Z"}