mc-publish/src/index.ts

14 lines
364 B
TypeScript
Raw Normal View History

2023-05-16 23:22:15 -04:00
import { main } from "@/program";
/**
* The exit code for failure situations.
*/
const EXIT_FAILURE = 1;
// Execute the script and catch any errors it may throw.
// If the script threw an error, exit with generic failure exit code.
const exitCode = await main().catch(() => EXIT_FAILURE);
if (typeof exitCode === "number") {
process.exitCode = exitCode;
2022-07-05 11:08:11 -04:00
}