Add catch and exit with non-zero

This commit is contained in:
Fabio Berger 2018-08-23 14:53:16 +01:00
parent 6c7dca7d07
commit ae937cfcce

View File

@ -11,11 +11,13 @@ const args = yargs
})
.example('$0 --isDryRun true', 'Full usage example').argv;
// tslint:disable-next-line:no-floating-promises
(async () => {
const isDryRun = args.isDryRun;
const shouldIncludePrivate = false;
const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate);
await publishReleaseNotesAsync(allUpdatedPackages, isDryRun);
})();
})().catch(err => {
utils.log(err);
process.exit(1);
});