mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 22:34:24 +00:00
be more explicit about setting the default option value to 'vm'
This commit is contained in:
parent
ac930d0be0
commit
f790ecdcbb
@ -274,12 +274,13 @@ class Cmd {
|
|||||||
.option('--loglevel [loglevel]', __('level of logging to display') + ' ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'warn')
|
.option('--loglevel [loglevel]', __('level of logging to display') + ' ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'warn')
|
||||||
.description(__('run tests'))
|
.description(__('run tests'))
|
||||||
.action(function(file, options) {
|
.action(function(file, options) {
|
||||||
const node = options.node;
|
const node = options.node || 'vm';
|
||||||
const urlRegexExp = /^(vm|embark|((ws|https?):\/\/([a-zA-Z0-9_.-]*):?([0-9]*)?))$/i;
|
const urlRegexExp = /^(vm|embark|((ws|https?):\/\/([a-zA-Z0-9_.-]*):?([0-9]*)?))$/i;
|
||||||
if (node && !(node === 'embark' || node === 'vm' || node.match(urlRegexExp))) {
|
if (node && !(node === 'embark' || node === 'vm' || node.match(urlRegexExp))) {
|
||||||
console.error(`invalid --node option: must be 'vm', 'embark' or a valid URL`.red);
|
console.error(`invalid --node option: must be 'vm', 'embark' or a valid URL`.red);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
options.node = node;
|
||||||
checkDeps();
|
checkDeps();
|
||||||
i18n.setOrDetectLocale(options.locale);
|
i18n.setOrDetectLocale(options.locale);
|
||||||
embark.runTests({file, loglevel: options.loglevel, gasDetails: options.gasDetails,
|
embark.runTests({file, loglevel: options.loglevel, gasDetails: options.gasDetails,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user