{"record":{"id":"e3ea8270b2801e9d","repo":"jdx/mise","slug":"brew-cask-no-supported-install-artifact-found-e3ea82","errorCode":null,"errorMessage":"brew-cask:{}: no supported install artifact found","messagePattern":"brew-cask:(.+?): no supported install artifact found","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask/artifacts.rs","lineNumber":71,"sourceCode":"            continue;\n        }\n        bail!(\n            \"brew-cask:{}: unsupported artifact type {}\",\n            cask.token,\n            artifact_type\n        );\n    }\n    if artifacts.apps.is_empty()\n        && artifacts.binaries.is_empty()\n        && artifacts.command_wrappers.is_empty()\n        && artifacts.pkgs.is_empty()\n        && artifacts.installers.is_empty()\n        && artifacts.generic.is_empty()\n        && artifacts.fonts.is_empty()\n        && artifacts.completions.is_empty()\n        && artifacts.generated_completions.is_empty()\n    {\n        bail!(\n            \"brew-cask:{}: no supported install artifact found\",\n            cask.token\n        );\n    }\n    artifacts.pkg_ids.sort();\n    artifacts.pkg_ids.dedup();\n    if artifacts.pkgs.is_empty() {\n        artifacts.pkg_ids.clear();\n    } else if artifacts.pkg_ids.is_empty() {\n        bail!(\n            \"brew-cask:{}: pkg artifacts require pkgutil ids in uninstall metadata\",\n            cask.token\n        );\n    }\n    Ok(artifacts)\n}\n\npub(super) fn validate_platform_support(cask: &Cask, artifacts: &CaskArtifacts) -> Result<()> {","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/packages/brew/cask/artifacts.rs#L53-L89","documentation":"After parsing all artifacts of a cask, cask_artifacts checks that at least one supported install artifact (app, pkg, installer, generic, font, completions, generated completions) was found. A cask whose stanzas yield nothing installable by this implementation bails with this error naming the token, because there is no way to represent or install the package state.","triggerScenarios":"Installing or querying package_state for a cask that declares no supported artifact — e.g. it only has `uninstall` stanzas, only `stage_only: true`, only zap stanzas, or an empty/blank artifact list, or all its artifacts were rejected earlier in the parse loop.","commonSituations":"Stage-only or auto-update-only casks that ship no artifacts to link; casks where every artifact type is unsupported so they were skipped and the list ended up empty; stale cask metadata from an outdated tap; typo'd custom casks with no artifact stanza at all.","solutions":["Run `brew cat --cask <token>` and confirm the cask actually declares installable artifacts (app/pkg/binary/generic/font, etc.).","Update the cask/tap: brew update (or tap update) so the cask definition is current, then retry.","If the cask is stage-only or otherwise has no artifacts, install it directly with `brew install --cask <token>`; this library cannot manage it.","If you wrote the cask, add a supported artifact stanza (e.g. `app \"MyApp.app\"`)."],"exampleFix":"// before: cask has no installable stanza\ncask \"mytool\" do\n  version \"1.0\"\n  url \"https://example.com/mytool.zip\"\nend\n// after\ncask \"mytool\" do\n  version \"1.0\"\n  url \"https://example.com/mytool.zip\"\n  app \"MyTool.app\"\nend","handlingStrategy":"validation","validationCode":"const hasInstallable = (caskJson) =>\n  (caskJson.artifacts || []).some(a =>\n    [\"app\", \"pkg\", \"binary\", \"generic\", \"font\", \"completions\"].some(k => k in a));\nif (!hasInstallable(brewInfoCask(token))) skipInstall(token);","typeGuard":null,"tryCatchPattern":"match cask_artifacts(&cask) {\n    Err(e) if e.to_string().contains(\"no supported install artifact\") => {\n        eprintln!(\"{} is stage-only/uninstall-only; manage with brew directly\", cask.token);\n    }\n    other => other?,\n}","preventionTips":["Run `brew update` before batch cask operations so definitions are current.","Filter cask lists to those with installable artifacts before automated installs.","Skip stage_only / uninstall-only casks in tooling.","Validate custom casks declare at least one artifact stanza."],"tags":["brew-cask","homebrew","artifacts","validation"],"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"}