{"record":{"id":"93ed5926fe1a9d28","repo":"jdx/mise","slug":"brew-cask-conflicts-with-installed-cask","errorCode":null,"errorMessage":"brew-cask:{}: conflicts with installed cask {}","messagePattern":"brew-cask:(.+?): conflicts with installed cask (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask.rs","lineNumber":395,"sourceCode":"            bail!(\"brew-cask:{}: dependency cycle detected\", cask.token);\n        }\n        let mut ancestors = ancestors.clone();\n        ancestors.insert(cask.token.clone());\n        let artifacts = cask_artifacts(&cask)?;\n        validate_platform_support(&cask, &artifacts)?;\n        if homebrew_metadata_present(&cask.token) {\n            bail!(\n                \"brew-cask:{}: Homebrew owns this cask; remove it with Homebrew before installing it with mise\",\n                cask.token\n            );\n        }\n        if installed_cask_version(&cask, &artifacts)?.as_deref() == Some(cask.version.as_str()) {\n            info!(\"brew-cask:{}: already installed\", cask.token);\n            return Ok(cask.version);\n        }\n        for conflict in &cask.conflicts_with.cask {\n            if !installed_versions(conflict).is_empty() {\n                bail!(\n                    \"brew-cask:{}: conflicts with installed cask {}\",\n                    cask.token,\n                    conflict\n                );\n            }\n        }\n        if !cask.depends_on.formula.is_empty() {\n            let dependencies = cask\n                .depends_on\n                .formula\n                .iter()\n                .map(|name| PackageRequest {\n                    name: name.clone(),\n                    version: None,\n                    tap_url: None,\n                })\n                .collect::<Vec<_>>();\n            super::BrewManager::new()","sourceCodeStart":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/packages/brew/cask.rs#L377-L413","documentation":"Homebrew cask JSON may declare `conflicts_with.cask` — tokens that must not coexist with this cask. mise reads each conflicting token's Caskroom directory; if any version directories are present there, installation is refused with this error before anything is downloaded or modified.","triggerScenarios":"Installing cask A when a cask B listed in A's conflicts_with.cask array has entries under <Caskroom>/<B> — whether installed by mise or by brew, the check only looks for version directories.","commonSituations":"GUI tools shipping the same helper or daemon (two VPN clients, two versions of a driver); migrated machines where the old conflicting app is still present.","solutions":["Uninstall the conflicting cask: `mise uninstall brew-cask:<conflict>` or `brew uninstall --cask <conflict>`, then retry","If you believe the conflict declaration is wrong, check the cask JSON and report it to the tap maintainer"],"exampleFix":"# before\n$ mise install brew-cask:app-a\nerror: brew-cask:app-a: conflicts with installed cask app-b\n\n# after\n$ mise uninstall brew-cask:app-b\n$ mise install brew-cask:app-a","handlingStrategy":"validation","validationCode":"// Before install, check the target cask's declared conflicts against the Caskroom:\nfn conflicts_installed(conflicts: &[String]) -> Vec<String> {\n    conflicts.iter().filter(|c| caskroom_has_versions(c)).cloned().collect()\n}\n// caskroom_has_versions lists version dirs, ignoring .metadata and .mise-tmp- entries","typeGuard":null,"tryCatchPattern":"Catch 'conflicts with installed cask' errors, surface the conflicting token from the message, and offer to uninstall it; do not auto-uninstall without consent.","preventionTips":["Read a cask's conflicts_with before adopting it","Remove superseded conflicting apps during machine migration instead of leaving both installed"],"tags":["homebrew","cask","conflict","mise"],"backgroundTag":"package-conflict","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}