Skip to content

Commit

Permalink
Merge pull request #200 from nickcmaynard/issue-198
Browse files Browse the repository at this point in the history
Always pass an exit code
  • Loading branch information
Inrixia authored May 1, 2024
2 parents 069f359 + c61f6a6 commit 69ff9bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/float.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/prompts/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

0 comments on commit 69ff9bd

Please sign in to comment.