coryd.dev/cli/lib/handlers.js
Cory Dransfeldt efe701f939
feat(*.liquid): apply prettier to liquid templates
- offer to create tag when none is found while adding a link from cli
- fix tag display in search
2025-06-16 14:41:29 -07:00

14 lines
344 B
JavaScript

export const handleExitError = (err, type = "Unhandled error") => {
const isExit =
err?.name === "ExitPromptError" ||
err?.code === "ERR_CANCELED" ||
err?.message?.includes("SIGINT");
if (isExit) {
console.log("\n👋 Exiting. Cya!\n");
process.exit(0);
}
console.error(`${type}:`, err);
process.exit(1);
};