Update preflight fail process

This commit is contained in:
Benjamin Toby 2023-10-29 12:36:35 +01:00
parent 50472dc67f
commit c7096db568
2 changed files with 11 additions and 2 deletions

View File

@ -162,7 +162,16 @@ function preflightFn(preflight) {
if (typeof preflight == "string") {
execFileSync(preflight, options);
} else if (typeof preflight == "object" && preflight?.[0]) {
preflight.forEach((cmd) => execSync(cmd, options));
preflight.forEach((cmd, index) => {
try {
execSync(cmd, options);
} catch (error) {
console.log(
`${colors.FgRed}Error:${colors.Reset} Preflight command ${cmd} Failed! => ${error.message}`
);
process.exit();
}
});
}
return true;
} catch (error) {

View File

@ -1,6 +1,6 @@
{
"name": "nodecid",
"version": "1.0.0",
"version": "1.0.1",
"description": "Simple CI/CD process",
"main": "index.js",
"bin": {