Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/bun/scripts/install-bun.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}

Expand Down