Allow for bun to be the executor and bring back the spinner

This commit is contained in:
David Heinemeier Hansson
2026-05-01 08:31:38 +02:00
parent ec69817e74
commit 0555c34416
+5 -3
View File
@@ -29,19 +29,21 @@ fi
node_bin="\$node_root/bin/node"
npx_bin="\$node_root/bin/npx"
# Resolve the package bin inside npx, then run it with node@latest without leaking node@latest into PATH.
# Resolve the package bin inside npx, then run it with node@latest available for node shebangs.
# Some wrappers are aliases, e.g. playwright-cli wraps the playwright bin.
"\$node_bin" "\$npx_bin" --yes --prefer-online --package "\$package" -- true
package_bin_path=\$("\$node_bin" "\$npx_bin" --yes --package "\$package" -- which "\$package" 2>/dev/null)
if [[ -n \$package_bin_path ]]; then
exec "\$node_bin" "\$package_bin_path" "\$@"
PATH="\$node_root/bin:\$PATH" exec "\$package_bin_path" "\$@"
fi
# Scoped packages like @openai/codex expose an unscoped bin like codex.
package_bin_path=\$("\$node_bin" "\$npx_bin" --yes --package "\$package" -- which "\$command" 2>/dev/null)
if [[ -n \$package_bin_path ]]; then
exec "\$node_bin" "\$package_bin_path" "\$@"
PATH="\$node_root/bin:\$PATH" exec "\$package_bin_path" "\$@"
fi
echo "Could not resolve npm bin for \$package / \$command" >&2