mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 06:25:57 +00:00
show option usage help with invalid —node
option and simplied the valid option check to pure regex
This commit is contained in:
parent
203039763d
commit
269d544ab3
@ -278,6 +278,7 @@ class Cmd {
|
||||
const urlRegexExp = /^(vm|embark|((ws|https?):\/\/([a-zA-Z0-9_.-]*):?([0-9]*)?))$/i;
|
||||
if (!(node === 'embark' || node === 'vm' || node.match(urlRegexExp))) {
|
||||
console.error(`invalid --node option: must be 'vm', 'embark' or a valid URL`.red);
|
||||
options.outputHelp();
|
||||
process.exit(1);
|
||||
}
|
||||
options.node = node;
|
||||
|
Loading…
x
Reference in New Issue
Block a user