Skip to content

Commit 4ada534

Browse files
authored
Fix PGBI#190
Catch rc version, put a warning about rc version but continue by fixing the version to avoid failure when running `semver.lt` comparison
1 parent 7f67701 commit 4ada534

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/kong-dashboard.js

+5
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ function start(argv) {
158158
terminal.error(error);
159159
process.exit(1);
160160
}).then((version) => {
161+
var rcRegex = /rc[\d]{0,}$/;
162+
if (rcRegex.test(version)) {
163+
terminal.info("Kong version is a release candidate e.g " + version + ". You may encounter issues");
164+
version = version.replace(rcRegex, '');
165+
}
161166
if (semver.lt(version, '0.9.0')) {
162167
terminal.error("This version of Kong dashboard doesn't support Kong v0.9 and lower.");
163168
process.exit(1);

0 commit comments

Comments
 (0)