Skip to content

Commit

Permalink
Fix PGBI#190
Browse files Browse the repository at this point in the history
Catch rc version, put a warning about rc version
but continue by fixing the version to avoid failure when running `semver.lt` comparison
  • Loading branch information
ThomasG77 authored Mar 19, 2019
1 parent 7f67701 commit 4ada534
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/kong-dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.info("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);
Expand Down

0 comments on commit 4ada534

Please sign in to comment.