Skip to content

Commit d656494

Browse files
authored
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.
1 parent 2e7a29e commit d656494

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/bun/scripts/install-bun.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ const https = require('https');
1010
const installScriptUrl = 'https://bun.sh/install';
1111

1212
// Check if bun is installed
13-
exec('bun -version', (error, version) => {
13+
exec('bun --version', (error, version) => {
1414
if (error) {
1515
console.error('bun is not installed. Installing...');
1616
installLatestBun();
1717
} else {
18-
const versionBefore = version.trim();
1918

2019
exec('bun upgrade', (error, stdout, stderr) => {
2120
if (error) {
@@ -26,6 +25,7 @@ exec('bun -version', (error, version) => {
2625
const out = [stdout, stderr].join('\n');
2726

2827
if (out.includes("You're already on the latest version of Bun")) {
28+
console.log('Bun is already up to date.');
2929
return;
3030
}
3131

0 commit comments

Comments
 (0)