From 519d8ba918f9b329fbd3d21fab67f11752f4db3a Mon Sep 17 00:00:00 2001 From: war-in Date: Wed, 17 Jan 2024 15:46:24 +0100 Subject: [PATCH] add logs --- lib/download.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/download.js b/lib/download.js index 00da288..f97190f 100644 --- a/lib/download.js +++ b/lib/download.js @@ -44,5 +44,13 @@ export async function downloadUniversalSierraCompiler() { const command = "curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh"; - exec(command); + exec(command, (error, stdout, stderr) => { + if (error) { + console.error(`Error while installing \`universal-sierra-compiler\`: ${error.message}`); + console.error(`Stderr: ${stderr}`) + return; + } + + console.log(`Successfully installed \`universal-sierra-compiler\``); + }); }