Updates
This commit is contained in:
Vendored
+10
-7
@@ -27,15 +27,18 @@ function killChild(childProcess, port) {
|
||||
try {
|
||||
const childProcessPID = childProcess.pid;
|
||||
childProcess.kill();
|
||||
if (typeof port == "object" && (port === null || port === void 0 ? void 0 : port[0])) {
|
||||
for (let i = 0; i < port.length; i++) {
|
||||
const singlePort = port[i];
|
||||
yield (0, kill_port_1.default)(Number(singlePort));
|
||||
try {
|
||||
if (typeof port == "object" && (port === null || port === void 0 ? void 0 : port[0])) {
|
||||
for (let i = 0; i < port.length; i++) {
|
||||
const singlePort = port[i];
|
||||
yield (0, kill_port_1.default)(Number(singlePort));
|
||||
}
|
||||
}
|
||||
else if (port) {
|
||||
yield (0, kill_port_1.default)(Number(port));
|
||||
}
|
||||
}
|
||||
else if (port) {
|
||||
yield (0, kill_port_1.default)(Number(port));
|
||||
}
|
||||
catch (error) { }
|
||||
return true;
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
Vendored
+1
-1
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
export default function startProcess({ command, preflight, postflight, redeploy_file, port, first_run, }: {
|
||||
command: string;
|
||||
preflight: string[] | string;
|
||||
preflight?: string[] | string;
|
||||
postflight?: string[] | string;
|
||||
redeploy_file: string;
|
||||
port?: string | number | (string | number)[];
|
||||
|
||||
Vendored
+1
-6
@@ -26,11 +26,7 @@ function startProcess({ command, preflight, postflight, redeploy_file, port, fir
|
||||
try {
|
||||
if (first_run) {
|
||||
console.log("First Run ...");
|
||||
const runPreflight = (0, preflight_1.default)(preflight);
|
||||
}
|
||||
if (!preflight) {
|
||||
console.log(`${console_colors_1.default.FgRed}Error:${console_colors_1.default.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 runFirstPreflight = (0, preflight_1.default)(preflight);
|
||||
}
|
||||
childProcess = (0, run_1.default)(command);
|
||||
if (!childProcess) {
|
||||
@@ -50,7 +46,6 @@ function startProcess({ command, preflight, postflight, redeploy_file, port, fir
|
||||
try {
|
||||
const runPreflight = (0, preflight_1.default)(preflight);
|
||||
if (!runPreflight) {
|
||||
// TODO: Action to take if preflight fails
|
||||
console.log(`${console_colors_1.default.FgRed}Error:${console_colors_1.default.Reset} Preflight Failed.`);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user