{"record":{"id":"7bc07ba48255fc80","repo":"jdx/mise","slug":"brew-cask-unsupported-kind-step-type","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.rs","lineNumber":5787,"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\nfn parse_flight_sudo(cask: &Cask, kind: &str, value: Option<&Value>) -> 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    }\n}\n\nfn parse_flight_guards(cask: &Cask, kind: &str, value: Option<&Value>) -> Result<Vec<FlightGuard>> {\n    value","sourceCodeStart":5769,"sourceCodeEnd":5805,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/system/packages/brew/cask.rs#L5769-L5805","documentation":"The catch-all arm of parse_flight_step. Each step object in preflight_steps/postflight_steps needs a \"type\", and mise implements exactly six: move, remove, copy, symlink, run, terminate_process. Any other type string — e.g. set_permissions, delete, launchctl — is unsupported and fails the whole cask parse with the cask token and offending type in the message.","triggerScenarios":"{\"type\": \"set_permissions\", ...} or any unrecognized type string inside a steps array of preflight_steps/postflight_steps; also triggered by step objects whose type key is present but names a Homebrew feature mise has not implemented.","commonSituations":"Homebrew casks using newer or rarer flight features (permissions, launchd management) that mise's Rust parser has not implemented yet; hand-written steps inventing types; version skew between Homebrew metadata and mise.","solutions":["Replace the unsupported step with one of the implemented types (move, remove, copy, symlink, run, terminate_process) if the effect can be expressed that way","Update mise — new step types are added over time; retest after upgrading","Otherwise install the cask with native brew instead of mise and report the cask token to the mise issue tracker"],"exampleFix":"// before\n{\"steps\": [{\"type\": \"set_permissions\", \"path\": \"bin/tool\", \"mode\": \"755\"}]}\n// after\n{\"steps\": [{\"type\": \"run\", \"command\": {\"path\": \"chmod\", \"args\": [\"755\", \"bin/tool\"]}}]}","handlingStrategy":"validation","validationCode":"const SUPPORTED_STEP_TYPES: &[&str] = &[\"move\", \"remove\", \"copy\", \"symlink\", \"run\", \"terminate_process\"];\n\nfn flight_steps_ok(v: &serde_json::Value, kind: &str) -> bool {\n    let Some(groups) = v.get(kind).and_then(|g| g.as_array()) else { return true; };\n    groups.iter().all(|g| g.get(\"steps\").and_then(|s| s.as_array()).map(|steps| {\n        steps.iter().all(|s| {\n            s.get(\"type\").and_then(|t| t.as_str())\n                .map(|t| SUPPORTED_STEP_TYPES.contains(&t))\n                .unwrap_or(false)\n        })\n    }).unwrap_or(false))\n}","typeGuard":"fn is_supported_step_type(v: &serde_json::Value) -> bool {\n    v.as_str().map(|t| [\"move\", \"remove\", \"copy\", \"symlink\", \"run\", \"terminate_process\"].contains(&t)).unwrap_or(false)\n}","tryCatchPattern":"match parse_flight_steps(&cask, &artifact, kind) {\n    Ok(steps) => { /* proceed */ }\n    Err(e) if e.to_string().contains(\"step type\") => {\n        eprintln!(\"cask {} uses a flight step type mise does not implement; update mise or use brew directly\", cask.token);\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Restrict custom cask steps to move/remove/copy/symlink/run/terminate_process","After Homebrew metadata refreshes, upgrade mise before installing casks with new step types"],"tags":["brew-cask","mise","flight-steps","unsupported-feature","enum-validation"],"backgroundTag":"brew-cask-stanza-validation","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}