Merge pull request #106 from pandaninjas/patch-3

Restrict the Java Version analysis responses
This commit is contained in:
Sefa Eyeoglu 2023-02-24 08:17:21 +01:00 committed by GitHub
commit b6f19c014d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ type LogProvider = (text: string) => Promise<null | string>;
const javaAnalyzer: Analyzer = async (text) => {
if (text.includes('This instance is not compatible with Java version')) {
const xp =
/Please switch to one of the following Java versions for this instance:[\r\n]+([^\r\n]+)/g;
/Please switch to one of the following Java versions for this instance:[\r\n]+(Java version (?:\d|\.)+)/g;
let ver: string;
const m = text.match(xp);