Throw error in script for better visibility

This commit is contained in:
Matthew Lopez
2024-07-30 17:40:37 -04:00
parent a9505fea12
commit 2a6dd14aa0

View File

@@ -16,8 +16,7 @@ async function runAsync() {
if (pnid) {
await updatePnidAccessLevel(pnid, 3, "dev");
} else {
console.error(`No PNID found for username ${process.argv[1]}.`);
process.exit(1);
throw new Error(`No PNID found for username ${process.argv[1]}.`);
}
}