From 269d544ab36f337bfdb7cfcd2b67c15ed7ef4d7a Mon Sep 17 00:00:00 2001 From: emizzle Date: Sat, 15 Sep 2018 11:32:16 +1000 Subject: [PATCH] =?UTF-8?q?show=20option=20usage=20help=20with=20invalid?= =?UTF-8?q?=20`=E2=80=94node`=20option=20and=20simplied=20the=20valid=20op?= =?UTF-8?q?tion=20check=20to=20pure=20regex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/cmd.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/cmd.js b/cmd/cmd.js index 516d1182..a8ba75ae 100644 --- a/cmd/cmd.js +++ b/cmd/cmd.js @@ -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;