mirror of https://github.com/embarklabs/embark.git
for --host,--port coerce falsy and bool to null
This commit is contained in:
parent
64027a5ee4
commit
a966ecb131
|
@ -178,10 +178,11 @@ class Cmd {
|
||||||
.action(function(env, options) {
|
.action(function(env, options) {
|
||||||
checkDeps();
|
checkDeps();
|
||||||
i18n.setOrDetectLocale(options.locale);
|
i18n.setOrDetectLocale(options.locale);
|
||||||
|
const nullify = (v) => (!v || typeof v !== 'string') ? null : v;
|
||||||
embark.run({
|
embark.run({
|
||||||
env: env || 'development',
|
env: env || 'development',
|
||||||
serverPort: options.port,
|
serverPort: nullify(options.port),
|
||||||
serverHost: options.host,
|
serverHost: nullify(options.host),
|
||||||
client: options.client || 'geth',
|
client: options.client || 'geth',
|
||||||
locale: options.locale,
|
locale: options.locale,
|
||||||
runWebserver: !options.noserver,
|
runWebserver: !options.noserver,
|
||||||
|
|
Loading…
Reference in New Issue