mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-25 18:01:07 -05:00
13 lines
364 B
TypeScript
13 lines
364 B
TypeScript
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;
|
|
}
|