File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,9 +10,52 @@ if [[ "$#" -eq 0 ]]; then
1010 exit 2
1111fi
1212
13+ # Homebrew installs can replace shared libraries used by already-discovered
14+ # Homebrew binaries. Resolve every system toolchain first, then discover and
15+ # project host language runtimes from the final host state. This keeps host
16+ # binaries first when they remain compatible and lets abxpkg select the managed
17+ # provider when a package-manager mutation invalidated one.
18+ requested_sections=(" $@ " )
19+ section_priority=(
20+ manager_binaries
21+ linux_binaries
22+ go_binaries
23+ cargo_binaries
24+ gem_binaries
25+ python_cli_binaries
26+ node_npm_binaries
27+ pnpm_binaries
28+ yarn_binaries
29+ bun_binaries
30+ deno_binaries
31+ host_utility_binaries
32+ docker_binaries
33+ )
34+ ordered_sections=()
35+ for priority_section in " ${section_priority[@]} " ; do
36+ for requested_section in " ${requested_sections[@]} " ; do
37+ if [[ " $requested_section " == " $priority_section " ]]; then
38+ ordered_sections+=(" $requested_section " )
39+ break
40+ fi
41+ done
42+ done
43+ for requested_section in " ${requested_sections[@]} " ; do
44+ section_ordered=false
45+ for ordered_section in " ${ordered_sections[@]} " ; do
46+ if [[ " $requested_section " == " $ordered_section " ]]; then
47+ section_ordered=true
48+ break
49+ fi
50+ done
51+ if [[ " $section_ordered " == false ]]; then
52+ ordered_sections+=(" $requested_section " )
53+ fi
54+ done
55+
1356env_json=" $(
1457 args=()
15- for section in " $@ " ; do
58+ for section in " ${ordered_sections[@]} " ; do
1659 args+=(" --deps-from=$CONFIG_PATH :$section " )
1760 done
1861 uv run --project " $REPO_ROOT " abxpkg env --install --json " ${args[@]} "
You can’t perform that action at this time.
0 commit comments