Remove automatic first run

This commit is contained in:
Benjamin Toby
2023-10-29 13:04:21 +01:00
parent c7096db568
commit 8816b0292b
5 changed files with 14 additions and 7 deletions
+7 -5
View File
@@ -31,12 +31,14 @@ let childProcess = null;
* @param {string[] | string} param0.preflight
* @param {string} param0.redeploy_file
* @param {string | number} [param0.port]
* @param {boolean} [param0.first_run] - Whether to run the preflight on first run. Default `false`
*/
function startProcess({ command, preflight, redeploy_file, port }) {
function startProcess({ command, preflight, redeploy_file, port, first_run }) {
try {
console.log("First Run ...");
const runPreflight = preflightFn(preflight);
if (first_run) {
console.log("First Run ...");
const runPreflight = preflightFn(preflight);
}
if (!preflight) {
console.log(
@@ -164,7 +166,7 @@ function preflightFn(preflight) {
} else if (typeof preflight == "object" && preflight?.[0]) {
preflight.forEach((cmd, index) => {
try {
execSync(cmd, options);
const execCmd = execSync(cmd, options);
} catch (error) {
console.log(
`${colors.FgRed}Error:${colors.Reset} Preflight command ${cmd} Failed! => ${error.message}`