Update preflight fail process
This commit is contained in:
parent
50472dc67f
commit
c7096db568
@ -162,7 +162,16 @@ function preflightFn(preflight) {
|
|||||||
if (typeof preflight == "string") {
|
if (typeof preflight == "string") {
|
||||||
execFileSync(preflight, options);
|
execFileSync(preflight, options);
|
||||||
} else if (typeof preflight == "object" && preflight?.[0]) {
|
} 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;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nodecid",
|
"name": "nodecid",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "Simple CI/CD process",
|
"description": "Simple CI/CD process",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
Loading…
Reference in New Issue
Block a user