From 920bb057390f08a397081be3abbd55716edb0c2e Mon Sep 17 00:00:00 2001 From: swee <meow@swee.codes> Date: Mon, 20 Jan 2025 19:10:08 -0800 Subject: [PATCH] Update index.js --- index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index da16513..7af3316 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,11 @@ -const { exec } = require('node:child_process') +const { exec } = require('node:child_process'); var additional = process.env.INPUT_ADDITIONAL; -console.log("# apk add bash git " + additional) exec('apk add bash git ' + additional, (err, output) => { - console.log(output) + if (err) { + console.log("Something went wrong..."); + console.log(output); + process.exit(1); + } else { + console.log("Successfully installed packages!"); + } }) \ No newline at end of file