{"record":{"id":"7d8f032f716f759e","repo":"jdx/mise","slug":"brew-cask-installer-executable-was-not-found","errorCode":null,"errorMessage":"brew-cask: installer executable '{}' was not found","messagePattern":"brew-cask: installer executable '(.+?)' was not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask.rs","lineNumber":2323,"sourceCode":"    // `allow_current_user` is true because a per-user appdir such as\n    // `~/Applications` is legitimately owned by the invoking user.\n    open_trusted_directory(Path::new(\"/\"), relative, true, true)\n}\n\nfn run_installer_artifact(\n    stage: &Path,\n    installer: &InstallerArtifact,\n    copied_files: &BTreeSet<PathBuf>,\n) -> Result<()> {\n    let executable = stage.join(&installer.executable);\n    if staged_relative_path(stage, &executable).is_none() {\n        bail!(\n            \"brew-cask: refusing installer executable outside trusted installer roots: {}\",\n            executable.display()\n        );\n    }\n    if !executable.is_file() {\n        bail!(\n            \"brew-cask: installer executable '{}' was not found\",\n            installer.executable\n        );\n    }\n    let executable = file::desymlink_path(&executable);\n    if !executable.starts_with(file::desymlink_path(stage)) && !copied_files.contains(&executable) {\n        bail!(\n            \"brew-cask: refusing installer executable outside trusted installer roots: {}\",\n            executable.display()\n        );\n    }\n    file::make_executable(&executable)?;\n    let prefix = prefix::prefix();\n    let mut paths = vec![prefix.join(\"bin\"), prefix.join(\"sbin\")];\n    if let Some(path) = std::env::var_os(\"PATH\") {\n        paths.extend(std::env::split_paths(&path));\n    }\n    let path = std::env::join_paths(paths)?;","sourceCodeStart":2305,"sourceCodeEnd":2341,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/packages/brew/cask.rs#L2305-L2341","documentation":"After confirming the installer executable sits inside the staging directory, mise requires it to exist as a regular file before running it. This error means the joined path is not a file: typically a wrong filename in the cask, a changed artifact layout, or a missing/failed download+extraction step.","triggerScenarios":"executable value with a typo or wrong case; the archive staged with an extra nesting level so the binary sits deeper; the download step failed or was skipped so the stage is empty; executable names a directory.","commonSituations":"Upstream releases renaming the installer binary between versions; stale tap casks; partially downloaded/cached artifacts; dmg layouts that differ from the stanza.","solutions":["List the staged artifact directory and compare its contents with the executable value in the cask","Update the cask (or the tap) so executable matches the real path inside the artifact","Clear the cached download/staging leftovers and retry the install","If the name is right but nesting differs, adjust the stanza to include the extra directory level"],"exampleFix":"# before -- binary is nested inside the .app bundle\nexecutable: \"Install Me\"\n\n# after\nexecutable: \"Install Me.app/Contents/MacOS/Install Me\"","handlingStrategy":"validation","validationCode":"let exe = stage.join(&installer.executable);\nif !exe.is_file() {\n    anyhow::bail!(\n        \"installer '{}' missing from stage; stage contains: {:?}\",\n        installer.executable,\n        std::fs::read_dir(stage)?.flatten().map(|e| e.file_name()).collect::<Vec<_>>()\n    );\n}","typeGuard":null,"tryCatchPattern":"match run_installer_artifact(stage, &installer, &copied) {\n    Err(e) if e.to_string().contains(\"was not found\") => {\n        // clear the cached download/staging leftovers and retry once\n        clean_stage(stage)?;\n        run_installer_artifact(stage, &installer, &copied)?\n    }\n    other => other?,\n}","preventionTips":["Verify the staged artifact tree matches the cask's executable stanza before invoking install","Keep casks updated when upstream renames installer binaries","Clear partial downloads instead of reusing them"],"tags":["brew-cask","installer","file-not-found"],"backgroundTag":"file-not-found","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}