From 33d57752aab9058e1d0613a3712db7fb7d83e4a3 Mon Sep 17 00:00:00 2001 From: Josh Guyette Date: Mon, 12 Feb 2024 07:48:32 -0600 Subject: [PATCH] code clean-up --- ngenv | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ngenv b/ngenv index 3fd8b91..77a3179 100755 --- a/ngenv +++ b/ngenv @@ -131,7 +131,7 @@ const errLogFile = `${projectFolder}/.ngenv/err.log`; /******************************************* Startup *******************************************/ // Show the root help -if (actionVerb === "--help" || actionVerb === "-h") { +if (!actionVerb || actionVerb === "--help" || actionVerb === "-h") { rootHelp(); process.exit(0); } @@ -182,7 +182,8 @@ switch (actionVerb) { break; } default: - rootHelp(); + console.log(`Unknown command: ${actionVerb}`); + console.log(`Run '${scriptName} --help' for usage.`); process.exit(1); }