{"record":{"id":"75a40ef4cacdba22","repo":"jdx/mise","slug":"at-least-one-bin-path-should-exist","errorCode":null,"errorMessage":"at least one bin path should exist","messagePattern":"at least one bin path should exist","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/aqua.rs","lineNumber":3053,"sourceCode":"        if bin_names.is_empty() {\n            let fallback_name = pkg\n                .name\n                .as_deref()\n                .and_then(|n| n.split('/').next_back())\n                .unwrap_or(&pkg.repo_name);\n            bin_names = vec![Cow::Borrowed(fallback_name)];\n        }\n        let bin_paths: Vec<_> = bin_names\n            .iter()\n            .map(|name| {\n                let name_str: &str = name.as_ref();\n                install_path.join(name_str)\n            })\n            .map(|path| complete_windows_ext(path, pkg, os(), v))\n            .collect();\n        let first_bin_path = bin_paths\n            .first()\n            .expect(\"at least one bin path should exist\");\n        let extract_opts = ExtractOptions {\n            pr: Some(ctx.pr.as_ref()),\n            ..Default::default()\n        };\n        let extraction_format = Self::effective_extraction_format(pkg, format)?;\n        let mut make_executable = false;\n        if let AquaPackageType::GithubArchive = pkg.package_type() {\n            file::extract_archive(\n                &tarball_path,\n                &install_path,\n                extraction_format,\n                &extract_opts,\n            )?;\n            make_executable = true;\n        } else if let AquaPackageType::GithubContent = pkg.package_type() {\n            if let Some(parent) = first_bin_path.parent() {\n                file::create_dir_all(parent)?;\n            }","sourceCodeStart":3035,"sourceCodeEnd":3071,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/backend/aqua.rs#L3035-L3071","documentation":"During aqua package installation the code maps every configured executable name to a bin path and then takes the first element with `.expect`. The panic means the `bin_paths` vector is empty — the aqua package manifest's `files`/`bin` section resolved to zero installable executables, so there is nothing to link into the install directory.","triggerScenarios":"Installing an aqua package whose parsed package config yields no executable entries: an empty or missing `files:` section, a `bin` name that matches no file in the archive, or platform/version filtering that drops all entries.","commonSituations":"A typo'd or missing `files[].name`/`src` in the aqua registry entry, an archive that changed layout in a new release so the declared bin no longer exists, or a Windows/OS-specific override filtering out all bins.","solutions":["Inspect the tool's aqua registry entry and confirm its `files:` section declares at least one valid `name`/`src` pair","Check the installed version's archive layout — if upstream renamed/moved the binary, fix or update the registry entry","Pin a different version whose layout matches the config (`mise use aqua:<pkg>@<older-version>`)","Report/fix the aqua-registry package definition"],"exampleFix":"# before (registry entry, files section omitted/empty)\npackages:\n  - type: github_release\n    repo_owner: example\n    repo_name: tool\n# after\npackages:\n  - type: github_release\n    repo_owner: example\n    repo_name: tool\n    asset: tool_{{.OS}}_{{.Arch}}.tar.gz\n    files:\n      - name: tool\n        src: tool","handlingStrategy":"validation","validationCode":"# validate before installing\nmise ls-remote aqua:<owner>/<repo>   # entry exists\nmise x aqua:<owner>/<repo>@<v> -- which <bin>  # bin resolves for this platform/version","typeGuard":"if (pkg.files ?? []).length === 0) throw new Error(`aqua package ${pkg.name} declares no files/bins`);","tryCatchPattern":"if mise install aqua:owner/repo 2>&1 | grep -q 'at least one bin path'; then echo 'registry entry has no resolvable bins — fix files: section or pin another version'; fi","preventionTips":["Confirm the registry entry's files: section matches the archive layout of the version you pin","After upstream releases, re-check that declared bin names still exist in the artifact","Test installs on the target OS — per-platform overrides can drop all bins"],"tags":["aqua","installation","config","empty-collection","panic"],"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-14T00:17:10.932Z"}