From a966ecb1310ceaf3b20d0324123d1fd3663d38e1 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Mon, 17 Sep 2018 17:47:08 -0500 Subject: [PATCH] for --host,--port coerce falsy and bool to null --- cmd/cmd.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/cmd.js b/cmd/cmd.js index 67743069..330a11ab 100644 --- a/cmd/cmd.js +++ b/cmd/cmd.js @@ -178,10 +178,11 @@ class Cmd { .action(function(env, options) { checkDeps(); i18n.setOrDetectLocale(options.locale); + const nullify = (v) => (!v || typeof v !== 'string') ? null : v; embark.run({ env: env || 'development', - serverPort: options.port, - serverHost: options.host, + serverPort: nullify(options.port), + serverHost: nullify(options.host), client: options.client || 'geth', locale: options.locale, runWebserver: !options.noserver,