From d656494beb5e12b81bb5cbea5d9fa3a26411d3f0 Mon Sep 17 00:00:00 2001 From: Mohataseem Khan Date: Sat, 13 Dec 2025 20:58:42 +0530 Subject: [PATCH] fix(bun): correct Bun version check and improve upgrade feedback the Bun installation helper script by fixing the Bun version check, removing unused code, and improving developer feedback when Bun is already up to date. --- packages/bun/scripts/install-bun.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bun/scripts/install-bun.js b/packages/bun/scripts/install-bun.js index 2f885c4f2b7d..c6754cadc473 100644 --- a/packages/bun/scripts/install-bun.js +++ b/packages/bun/scripts/install-bun.js @@ -10,12 +10,11 @@ const https = require('https'); const installScriptUrl = 'https://bun.sh/install'; // Check if bun is installed -exec('bun -version', (error, version) => { +exec('bun --version', (error, version) => { if (error) { console.error('bun is not installed. Installing...'); installLatestBun(); } else { - const versionBefore = version.trim(); exec('bun upgrade', (error, stdout, stderr) => { if (error) { @@ -26,6 +25,7 @@ exec('bun -version', (error, version) => { const out = [stdout, stderr].join('\n'); if (out.includes("You're already on the latest version of Bun")) { + console.log('Bun is already up to date.'); return; }