From 173dfd939d3f19aed7ca3c725626a3bcd01d1a37 Mon Sep 17 00:00:00 2001 From: Justin Murray Date: Wed, 10 Jun 2026 10:45:47 -0400 Subject: [PATCH] Prevent bun installer from modifying shell config --- bun | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bun b/bun index 58081d3..d647cbc 100755 --- a/bun +++ b/bun @@ -10,6 +10,10 @@ if [ ! -f "$bunCmd" ]; then if [ "$version" != "latest" ]; then bashArgs=(-s "$version") fi - curl -fsSL https://bun.sh/install | BUN_INSTALL="$downloadDir" bash "${bashArgs[@]}" + # Override SHELL so the installer's `case $(basename "$SHELL")` falls through + # to its default branch, which only prints manual instructions instead of + # appending BUN_INSTALL/PATH exports to ~/.bashrc (or .zshrc / config.fish). + # We invoke bun via its explicit path, so we don't need those PATH edits. + curl -fsSL https://bun.sh/install | SHELL="" BUN_INSTALL="$downloadDir" bash "${bashArgs[@]}" fi exec "$bunCmd" "$@"