Skip to content

Commit

Permalink
fix(cmd-api-server): no CLI args causes crash #794
Browse files Browse the repository at this point in the history
Guard against examinig the help command's presence if there's no
CLI arguments specified at all.

Fixes #794

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Apr 16, 2021
1 parent b298b76 commit a285b96
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -16,7 +16,7 @@ const main = async () => {

LoggerProvider.setLogLevel(serverOptions.logLevel);

if (process.argv[2].includes("help")) {
if (process.argv[2]?.includes("help")) {
const helpText = ConfigService.getHelpText();
console.log(helpText);
log.info(`Effective Configuration:`);
Expand Down

0 comments on commit a285b96

Please sign in to comment.