Skip to content

Commit 09ca551

Browse files
committed
Add --loglevel validation for run and build
1 parent 96495b9 commit 09ca551

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cmd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Cmd {
8888
program
8989
.command('build [environment]')
9090
.option('--logfile [logfile]', 'filename to output logs (default: none)')
91-
.option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"] (default: debug)')
91+
.option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug')
9292
.description('deploy and build dapp at dist/ (default: development)')
9393
.action(function (env, _options) {
9494
_options.env = env || 'development';
@@ -107,7 +107,7 @@ class Cmd {
107107
.option('--nodashboard', 'simple mode, disables the dashboard')
108108
.option('--no-color', 'no colors in case it\'s needed for compatbility purposes')
109109
.option('--logfile [logfile]', 'filename to output logs (default: none)')
110-
.option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"] (default: debug)',)
110+
.option('--loglevel [loglevel]', 'level of logging to display ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug')
111111
.description('run dapp (default: development)')
112112
.action(function (env, options) {
113113
embark.run({

0 commit comments

Comments
 (0)