{"record":{"id":"f985f206cdd8232b","repo":"jdx/mise","slug":"brew-cask-unsupported-kind-step-type-f985f2","errorCode":null,"errorMessage":"brew-cask:{}: unsupported {kind} step type {}","messagePattern":"brew-cask:(.+?): unsupported (.+?) step type (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask/artifacts.rs","lineNumber":873,"sourceCode":"            let failure_message = match object.get(\"failure_message\") {\n                None | Some(Value::Null) => None,\n                Some(Value::String(value)) => Some(value.clone()),\n                Some(_) => bail!(\n                    \"brew-cask:{}: {kind} terminate_process failure_message must be a string\",\n                    cask.token\n                ),\n            };\n            Ok(FlightStep::TerminateProcess {\n                name: name.to_string(),\n                match_mode,\n                sudo,\n                attempts,\n                must_succeed,\n                notices,\n                failure_message,\n            })\n        }\n        _ => bail!(\n            \"brew-cask:{}: unsupported {kind} step type {}\",\n            cask.token,\n            step_type\n        ),\n    }\n}\n\npub(super) fn parse_flight_sudo(\n    cask: &Cask,\n    kind: &str,\n    value: Option<&Value>,\n) -> Result<FlightSudo> {\n    match value {\n        None | Some(Value::Bool(false)) => Ok(FlightSudo::Never),\n        Some(Value::Bool(true)) => Ok(FlightSudo::Always),\n        Some(Value::String(value)) if value == \"if_needed\" => Ok(FlightSudo::IfNeeded),\n        _ => bail!(\"brew-cask:{}: unsupported {kind} sudo setting\", cask.token),\n    }","sourceCodeStart":855,"sourceCodeEnd":891,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/packages/brew/cask/artifacts.rs#L855-L891","documentation":"Flight steps (pre/post/uninstall step arrays) support a fixed set of step types (e.g. run, delete, copy, symlink, terminate_process). When the `type` field of a step doesn't correspond to any supported step type, parsing bails with the unrecognized `type` value and the cask token.","triggerScenarios":"A flight step entry whose `type` string is unknown to `parse_flight_step`, e.g. `type = \"launchctl\"`, `type = \"script\"`, or a typo like `type = \"runn\"`.","commonSituations":"Copying Homebrew Ruby cask stanza names (e.g. `zap`, `quarantine`) that the mise simplified flight schema doesn't implement, or typos in the type string.","solutions":["Check the supported step types in src/system/packages/brew/cask/artifacts.rs and change `type` to one of them (e.g. \"run\", \"delete\", \"copy\", \"symlink\", \"terminate_process\").","Remove the step if the operation isn't supported, or approximate it with a `run` step.","If the step type should exist, file an issue to add it to the cask flight-step parser."],"exampleFix":"// before\n[[flight.steps]]\ntype = \"launchctl\"\n... \n// after\n[[flight.steps]]\ntype = \"run\"\ncommand = \"launchctl remove com.example.myapp\"","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set([\"run\", \"delete\", \"copy\", \"symlink\", \"terminate_process\"]);\nfor (const step of flightSteps)\n  if (!SUPPORTED.has(step.type))\n    throw new Error(`unsupported step type: ${step.type}`);","typeGuard":"function isSupportedStepType(t, supported) {\n  return typeof t === \"string\" && supported.includes(t);\n}","tryCatchPattern":"try {\n  parseCaskArtifacts(cask);\n} catch (err) {\n  if (err.message.includes(\"unsupported\" ) && err.message.includes(\"step type\")) {\n    // map the step to a supported type or drop it\n  } else throw err;\n}","preventionTips":["Use only step types documented by mise's cask flight parser, not Homebrew Ruby cask stanza names.","Keep a list of supported step types handy and lint flight step arrays against it.","When porting a Homebrew cask, translate unsupported stanzas into `run` steps explicitly."],"tags":["brew-cask","config","enum","unsupported"],"backgroundTag":"invalid-enum-value","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}