Bugfix
This commit is contained in:
parent
e75d08ca10
commit
0bae517554
@ -71,12 +71,6 @@ function startProcess({ command, preflight, redeploy_file, port, first_run }) {
|
|||||||
console.log("******************************");
|
console.log("******************************");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const runPreflight = preflightFn(preflight);
|
|
||||||
|
|
||||||
if (!runPreflight) {
|
|
||||||
// TODO: Action to take if preflight fails
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!preflight) {
|
if (!preflight) {
|
||||||
console.log(
|
console.log(
|
||||||
`${colors.FgRed}Error:${colors.Reset} No preflight included in config file. If you don't want to run any preflight command simply add an empty array.`
|
`${colors.FgRed}Error:${colors.Reset} No preflight included in config file. If you don't want to run any preflight command simply add an empty array.`
|
||||||
@ -84,13 +78,23 @@ function startProcess({ command, preflight, redeploy_file, port, first_run }) {
|
|||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
killChild(port).then((kill) => {
|
const runPreflight = preflightFn(preflight);
|
||||||
if (kill) {
|
|
||||||
childProcess = run(command);
|
if (!runPreflight) {
|
||||||
} else {
|
// TODO: Action to take if preflight fails
|
||||||
process.exit();
|
|
||||||
}
|
console.log(
|
||||||
});
|
`${colors.FgRed}Error:${colors.Reset} No preflight included in config file. If you don't want to run any preflight command simply add an empty array.`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
killChild(port).then((kill) => {
|
||||||
|
if (kill) {
|
||||||
|
childProcess = run(command);
|
||||||
|
} else {
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
} catch (/** @type {*} */ error) {
|
} catch (/** @type {*} */ error) {
|
||||||
console.log(
|
console.log(
|
||||||
`${colors.FgRed}Error:${colors.Reset} killing child processes => ${error.message}`
|
`${colors.FgRed}Error:${colors.Reset} killing child processes => ${error.message}`
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nodecid",
|
"name": "nodecid",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"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