Run fn if metaUrl (always pass import.meta.url) refers to the
process's entry point. The result of fn is treated as the desired
exit code; thrown errors are logged to stderr and exit 1.
Use this at the bottom of every script — never call process.exit
directly inside main; just return a number.
Run
fnifmetaUrl(always passimport.meta.url) refers to the process's entry point. The result offnis treated as the desired exit code; thrown errors are logged to stderr and exit 1.Use this at the bottom of every script — never call
process.exitdirectly insidemain; just return a number.