Update index.js
This commit is contained in:
parent
22a8ea2dd1
commit
1073a5d68d
1 changed files with 12 additions and 10 deletions
20
index.js
20
index.js
|
@ -1,10 +1,12 @@
|
|||
const { exec } = require('node:child_process');
|
||||
var additional = process.env.INPUT_ADDITIONAL;
|
||||
exec('apk add bash git ' + additional, (err, output) => {
|
||||
if (err) {
|
||||
console.log("Something went wrong...");
|
||||
console.log(output);
|
||||
} else {
|
||||
console.log("Successfully installed packages!");
|
||||
const { exec } = require('child_process');
|
||||
exec('apk add bash git ' + additional, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`Error: ${error.message}`);
|
||||
return;
|
||||
}
|
||||
})
|
||||
if (stderr) {
|
||||
console.error(`Stderr: ${stderr}`);
|
||||
return;
|
||||
}
|
||||
console.log(`Stdout: ${stdout}`);
|
||||
});
|
Loading…
Add table
Reference in a new issue