diff --git a/src/float.ts b/src/float.ts index 959b9b8..7483785 100644 --- a/src/float.ts +++ b/src/float.ts @@ -55,7 +55,7 @@ const downloadNewVideos = async () => { }; // Fix for docker -process.on("SIGTERM", process.exit); +process.on("SIGTERM", () => process.exit(143)); (async () => { if (!args.headless) { @@ -76,7 +76,7 @@ process.on("SIGTERM", process.exit); if (args.sanityCheck) { console.log("Sanity check passed!"); - process.exit(); + process.exit(0); } // Earlybird functions, these are run before script start and not run again if script repeating is enabled. diff --git a/src/lib/prompts/helpers.ts b/src/lib/prompts/helpers.ts index e14b227..5235fa0 100644 --- a/src/lib/prompts/helpers.ts +++ b/src/lib/prompts/helpers.ts @@ -16,7 +16,7 @@ export const requiredPrompts = ( if (depth > 0 && depth < maxDepth) process.stdout.write(cancelPrompt); if (depth >= maxDepth) { console.log(`\nRequired prompt cancelled ${maxDepth} times! Exiting...`); - process.exit(); + process.exit(1); } prompts(prompt, { onCancel: () => res(requiredPrompts(prompt, maxDepth, cancelPrompt, (depth += 1))) }).then(res); });