From 986c18bd549ca8595ce2a8205d8340ceb612f2fb Mon Sep 17 00:00:00 2001 From: Thomas Gratier Date: Tue, 19 Mar 2019 03:40:11 +0100 Subject: [PATCH] Fix #190 Catch rc version, put a warning about rc version but continue by fixing the version to avoid failure when running `semver.lt` comparison --- bin/kong-dashboard.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/kong-dashboard.js b/bin/kong-dashboard.js index 1c4289b..06207fd 100755 --- a/bin/kong-dashboard.js +++ b/bin/kong-dashboard.js @@ -158,6 +158,11 @@ function start(argv) { terminal.error(error); process.exit(1); }).then((version) => { + var rcRegex = /rc[\d]{0,}$/; + if (rcRegex.test(version)) { + terminal.warning("Kong version is a release candidate e.g " + version + ". You may encounter issues"); + version = version.replace(rcRegex, ''); + } if (semver.lt(version, '0.9.0')) { terminal.error("This version of Kong dashboard doesn't support Kong v0.9 and lower."); process.exit(1);