{"record":{"id":"72dc464fbb7c8f41","repo":"jdx/mise","slug":"brew-cask-kind-terminate-process-name-must-n-72dc46","errorCode":null,"errorMessage":"brew-cask:{}: {kind} terminate_process name must not be empty","messagePattern":"brew-cask:(.+?): (.+?) terminate_process name must not be empty","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask/artifacts.rs","lineNumber":764,"sourceCode":"                object,\n                &[\n                    \"type\",\n                    \"name\",\n                    \"match\",\n                    \"sudo\",\n                    \"attempts\",\n                    \"must_succeed\",\n                    \"notices\",\n                    \"failure_message\",\n                ],\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\") {","sourceCodeStart":746,"sourceCodeEnd":782,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/packages/brew/cask/artifacts.rs#L746-L782","documentation":"While parsing a brew cask artifact flight step (install/uninstall/postflight-style steps), mise requires the `name` key of a `terminate_process` step to be a non-empty string. The name identifies the process to terminate, so an empty string would produce a step that can never match anything. The parser bails with this error instead of silently accepting a useless step.","triggerScenarios":"A cask artifact defines a `terminate_process` step whose `name` field is present but set to an empty string (e.g. `name = \"\"`). parse_flight_step rejects it after confirming `name` is a string.","commonSituations":"Hand-editing a cask definition and clearing the process name; templating that substitutes an empty value; copying a step and deleting the name value; migrating casks from Homebrew where the plist bundle identifier was optional.","solutions":["Set a non-empty `name` on the terminate_process step, e.g. the process name or full executable path.","Remove the terminate_process step entirely if no process needs terminating.","Check for empty variables/templating that yield an empty string and fix the substitution.","Validate the cask file with the mise parser before shipping it."],"exampleFix":"// before\n[[install.flight_steps]]\ntype = \"terminate_process\"\nname = \"\"\n// after\n[[install.flight_steps]]\ntype = \"terminate_process\"\nname = \"MyApp Helper\"","handlingStrategy":"validation","validationCode":"function validateTerminateName(step) {\n  if (typeof step?.name !== 'string' || step.name.trim() === '') {\n    throw new Error(`terminate_process step requires a non-empty string name (got ${JSON.stringify(step?.name)})`);\n  }\n}","typeGuard":"const hasTerminateName = (s) => typeof s?.name === 'string' && s.name.length > 0;","tryCatchPattern":null,"preventionTips":["Never leave terminate_process `name` blank; delete the step instead.","Run cask files through mise's parser/CI validation before publishing.","Beware templating that can substitute empty strings into `name`."],"tags":["brew-cask","config-validation","terminate-process"],"backgroundTag":"empty-required-field","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"}