{"record":{"id":"3016ef1f61b9dbd8","repo":"jdx/mise","slug":"brew-cask-conflicts-with-installed-cask-3016ef","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/mod.rs","lineNumber":616,"sourceCode":"                cask.token\n            );\n            return Ok(version);\n        }\n        let artifacts = cask_artifacts(&cask)?;\n        validate_platform_support(&cask, &artifacts)?;\n        // Validate the whole app batch before dependencies, downloads, or hooks\n        // can mutate anything, including when producing a dry-run plan.\n        artifacts.app_target_paths()?;\n        let installed_version = mise_installed_cask_version(&cask)?;\n        if let Some(reason) =\n            installed_skip_reason(&cask, &artifacts, installed_version.as_deref(), mode)?\n        {\n            info!(\"brew-cask:{}: {reason}\", cask.token);\n            return Ok(reason.to_string());\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                    desired: super::super::PackageDesiredState::Present,\n                })\n                .collect::<Vec<_>>();","sourceCodeStart":598,"sourceCodeEnd":634,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/packages/brew/cask/mod.rs#L598-L634","documentation":"Before installing, the cask's `conflicts_with cask` list is checked against currently installed casks (via installed_versions). If any conflicting cask has installed versions, the install is aborted because Homebrew casks declare hard conflicts that would produce broken or duplicated system state.","triggerScenarios":"Installing cask X whose stanza lists `conflicts_with cask: 'Y'` while cask Y is already installed (installed_versions(Y) non-empty).","commonSituations":"Conflicting GUI apps from different vendors (e.g. two Dropbox-like clients); switching between alternative tools where the old cask was installed outside this manager; Homebrew adding a new conflicts_with entry to an existing cask.","solutions":["Uninstall the conflicting cask first (`brew uninstall --cask <conflict>`) then retry.","If both are truly needed, remove the conflicts_with entry in a local/forked cask (at your own risk).","Choose an alternative cask that does not declare the conflict.","Check which installed cask triggered it via the conflict name in the message and decide whether you still need it."],"exampleFix":"// before\nbrew install --cask newapp   # conflicts with installed 'oldapp'\n// after\nbrew uninstall --cask oldapp && install newapp via manager","handlingStrategy":"try-catch","validationCode":"use std::process::Command;\nfn cask_conflicts_with_installed(conflicts: &[&str]) -> Vec<String> {\n    conflicts.iter().filter(|c| {\n        Command::new(\"brew\").args([\"list\", \"--cask\", c]).output()\n            .map(|o| o.status.success()).unwrap_or(false)\n    }).map(|c| c.to_string()).collect()\n}","typeGuard":null,"tryCatchPattern":"match install_result {\n    Err(e) if e.to_string().contains(\"conflicts with installed cask\") => {\n        let conflict = e.to_string().rsplit(' ').next().unwrap_or(\"<unknown>\");\n        eprintln!(\"uninstall the conflicting cask first: brew uninstall --cask {conflict}\");\n    }\n    other => other?,\n}","preventionTips":["Check the cask's conflicts_with list against `brew list --cask` before installing.","Uninstall superseded alternative tools when switching to a conflicting cask.","Keep installed casks managed through one tool so conflicts stay visible.","Review Homebrew cask conflicts announcements when updating tap metadata."],"tags":["rust","brew","cask","conflict","install"],"backgroundTag":"conflicting-config-options","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"}