From 899c183c5c49b236968ba12252ed604a17d37846 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Mon, 17 Mar 2025 17:38:37 +0800 Subject: [PATCH] refactor: improve installation scripts for bun and uv with success logging - Updated the installation scripts for bun and uv to log success messages upon successful completion. - Enhanced error handling to maintain existing functionality while providing clearer feedback during installation. --- resources/scripts/install-bun.js | 13 +++++++++---- resources/scripts/install-uv.js | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/resources/scripts/install-bun.js b/resources/scripts/install-bun.js index 3449f017..bbe7d5aa 100644 --- a/resources/scripts/install-bun.js +++ b/resources/scripts/install-bun.js @@ -194,7 +194,12 @@ async function installBun() { } // Run the installation -installBun().catch((error) => { - console.error('Installation failed:', error) - process.exit(1) -}) +installBun() + .then(() => { + console.log('Installation successful') + process.exit(0) + }) + .catch((error) => { + console.error('Installation failed:', error) + process.exit(1) + }) diff --git a/resources/scripts/install-uv.js b/resources/scripts/install-uv.js index 0cc8d9e8..d6378f63 100644 --- a/resources/scripts/install-uv.js +++ b/resources/scripts/install-uv.js @@ -204,7 +204,12 @@ async function installUv() { } // Run the installation -installUv().catch((error) => { - console.error('Installation failed:', error) - process.exit(1) -}) +installUv() + .then(() => { + console.log('Installation successful') + process.exit(0) + }) + .catch((error) => { + console.error('Installation failed:', error) + process.exit(1) + })