From da71e853bc5d98a60125a4ddab4df131598750b8 Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Sun, 29 Oct 2023 15:54:24 +0100 Subject: [PATCH] Bugfix --- deploy/start.js | 48 +----------------------------------------------- package.json | 2 +- 2 files changed, 2 insertions(+), 48 deletions(-) diff --git a/deploy/start.js b/deploy/start.js index af8eca5..5ee1dd1 100755 --- a/deploy/start.js +++ b/deploy/start.js @@ -71,20 +71,13 @@ function startProcess({ command, preflight, redeploy_file, port, first_run }) { console.log("******************************"); try { - if (!preflight) { - 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.` - ); - process.exit(); - } - const runPreflight = preflightFn(preflight); if (!runPreflight) { // TODO: Action to take if preflight fails 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} Preflight Failed.` ); } else { killChild(port).then((kill) => { @@ -226,45 +219,6 @@ async function killChild(port) { childProcess = null; - // await new Promise((resolve) => { - // setTimeout(() => { - // resolve(true); - // }, 1000); - // }); - - // console.log("Child Process Killed?", childProcess.killed); - - // if (childProcess.killed) { - // return true; - // } else { - // console.log( - // `${colors.FgYellow}WARNING:${colors.Reset} Child Process Not Killed` - // ); - - // console.log(childProcess); - - // let killRetries = 0; - - // while (!childProcess.killed) { - // console.log("Trying to Kill child =>", killRetries); - // killRetries++; - - // childProcess.kill(KILL_SIGNAL); - - // if (childProcess.killed) { - // return true; - // break; - // } - - // if (killRetries > 20) { - // console.log( - // `${colors.FgRed}Error:${colors.Reset} Child Process couldn't be killed!` - // ); - // process.exit(); - // } - // } - // } - return true; } catch (error) { console.log( diff --git a/package.json b/package.json index 5a0d300..8435a96 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodecid", - "version": "1.0.4", + "version": "1.0.5", "description": "Simple CI/CD process", "main": "index.js", "bin": {