{"record":{"id":"ec5f889d1924935a","repo":"jdx/mise","slug":"brew-cask-structured-symlink-source-did-not-ec5f88","errorCode":null,"errorMessage":"brew-cask: structured symlink source '{}' did not match any paths","messagePattern":"brew-cask: structured symlink source '(.+?)' did not match any paths","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask/flight.rs","lineNumber":709,"sourceCode":"            // transaction backup is sufficient for rollback; recording them\n            // would fingerprint their contents and force later reinstalls.\n        }\n        FlightStep::Symlink {\n            source,\n            target,\n            force,\n            uninstall,\n            source_glob,\n            sudo,\n            guards,\n        } => {\n            if !flight_guards_pass(cask, guards, staged_path, appdir)? {\n                return Ok(());\n            }\n            let target = resolve_flight_path_with_context(cask, target, staged_path, appdir)?;\n            let sources = flight_symlink_sources(cask, source, *source_glob, staged_path, appdir)?;\n            if sources.is_empty() {\n                bail!(\n                    \"brew-cask: structured symlink source '{}' did not match any paths\",\n                    source.path\n                );\n            }\n            let target_metadata = target.symlink_metadata().ok();\n            let target_is_real_dir = target_metadata\n                .as_ref()\n                .is_some_and(|metadata| metadata.is_dir());\n            let target_is_dir = target_is_real_dir || sources.len() > 1;\n            if sources.len() > 1 {\n                let created_external_directory =\n                    target_metadata.is_none() && !target.starts_with(staged_path);\n                if target_metadata.is_some() && !target_is_real_dir {\n                    if target.exists() && !force && !targets.previous_symlinks.contains(&target) {\n                        bail!(\n                            \"brew-cask: structured symlink target '{}' already exists\",\n                            target.display()\n                        );","sourceCodeStart":691,"sourceCodeEnd":727,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/packages/brew/cask/flight.rs#L691-L727","documentation":"A brew-cask structured symlink step uses a glob source (source_glob=true) whose expansion matched zero paths inside the staged application bundle. Since there is nothing to link, the step fails rather than creating an empty or dangling directory target.","triggerScenarios":"FlightStep::Symlink with source_glob=true where the pattern (template-expanded against staged_path) matches nothing — binary/CLI name changed in a new version, optional component not shipped, or a wrong glob base (see related staged_path requirement).","commonSituations":"Upstream renamed bundled executables between versions; a glob written for one app layout applied to another; installing on a platform/arch where that staged file is absent.","solutions":["Verify the glob pattern against the actual staged directory contents for the version being installed.","Update the pattern or template variable ({{version}}, {{arch}}) to match the new artifact names.","Make the step conditional with a guard (if_exists on the expected file) if the source is legitimately optional."],"exampleFix":"// before\nsource: { path: \"bin/*-cli\", glob: true }\n// after\nsource: { path: \"bin/myapp-cli-{{arch}}\", glob: true }","handlingStrategy":"validation","validationCode":"let sources = flight_symlink_sources(cask, source, true, staged_path, appdir)?;\nif sources.is_empty() {\n    eprintln!(\"warning: symlink glob {} matched nothing\", source.path);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Dry-run glob expansion against the staged path before install.","Update glob patterns when upstream renames binaries between versions.","Make optional links conditional with if_exists guards."],"tags":["brew-cask","glob","symlink","file-not-found"],"backgroundTag":"file-not-found","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"}