From 09ca551a22e069b5987a89e9123e18a6af9f1008 Mon Sep 17 00:00:00 2001 From: emizzle Date: Thu, 19 Apr 2018 14:43:41 +1000 Subject: [PATCH] Add --loglevel validation for `run` and `build` --- lib/cmd.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cmd.js b/lib/cmd.js index 1263f55a..5d60ee2a 100644 --- a/lib/cmd.js +++ b/lib/cmd.js @@ -88,7 +88,7 @@ class Cmd { program .command('build [environment]') .option('--logfile [logfile]', 'filename to output logs (default: none)') - .option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"] (default: debug)') + .option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug') .description('deploy and build dapp at dist/ (default: development)') .action(function (env, _options) { _options.env = env || 'development'; @@ -107,7 +107,7 @@ class Cmd { .option('--nodashboard', 'simple mode, disables the dashboard') .option('--no-color', 'no colors in case it\'s needed for compatbility purposes') .option('--logfile [logfile]', 'filename to output logs (default: none)') - .option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"] (default: debug)',) + .option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug') .description('run dapp (default: development)') .action(function (env, options) { embark.run({