From 0555c344162915282f86502adc61588842e4b96e Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 1 May 2026 08:31:38 +0200 Subject: [PATCH] Allow for bun to be the executor and bring back the spinner --- bin/omarchy-npx-install | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/omarchy-npx-install b/bin/omarchy-npx-install index e64b9660..c23c2650 100755 --- a/bin/omarchy-npx-install +++ b/bin/omarchy-npx-install @@ -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