code clean-up

This commit is contained in:
Josh Guyette 2024-02-12 07:48:32 -06:00
parent bd6b2e24fe
commit 33d57752aa
1 changed files with 3 additions and 2 deletions

5
ngenv
View File

@ -131,7 +131,7 @@ const errLogFile = `${projectFolder}/.ngenv/err.log`;
/******************************************* Startup *******************************************/ /******************************************* Startup *******************************************/
// Show the root help // Show the root help
if (actionVerb === "--help" || actionVerb === "-h") { if (!actionVerb || actionVerb === "--help" || actionVerb === "-h") {
rootHelp(); rootHelp();
process.exit(0); process.exit(0);
} }
@ -182,7 +182,8 @@ switch (actionVerb) {
break; break;
} }
default: default:
rootHelp(); console.log(`Unknown command: ${actionVerb}`);
console.log(`Run '${scriptName} --help' for usage.`);
process.exit(1); process.exit(1);
} }