Skip to content

Commit

Permalink
fix the log detection i think?
Browse files Browse the repository at this point in the history
Signed-off-by: IThundxr <[email protected]>
  • Loading branch information
IThundxr committed Sep 3, 2023
1 parent 30fe14e commit 98e6f6b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/logIssueAnalyzers/createVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,25 @@ export const createVersionAnalyzer: Analyzer = async (log) => {
const matchesCreate = log.mods
? log.mods.get('create') == '0.5.1.b'
: log.content.match(/create-(.)+-0\.5\.1\.b/);
const matchesSNR = log.mods.get('railways')?.includes('1.5.0');
const matchesSNR = log.mods.get('railways')?.match(/1\.5\.0/);
// Return an issue if both mods are present and the versions match.
if (matchesCreate && matchesSNR) {
return {
name: 'Incompatible with Create 0.5.1b',
value: "Create: Steam 'n' Rails `1.5.0` is incompatible with `Create 0.5.1b`. Upgrade to `Create 0.5.1c` or downgrade Steam 'n' Rails.",
};
}

const matchesCreate2 = log.mods
? log.mods.get('create') == '0.5.1.c'
: log.content.match(/create-(.)+-0\.5\.1\.c/);
const matchesSNR2 = log.mods.get('railways')?.match(/1\.4\.3/);
// Return an issue if both mods are present and the versions match.
if (matchesCreate2 && matchesSNR2) {
return {
name: 'Version error',
value: "Create: Steam 'n' Rails `1.4.3` is incompatible with `Create 0.5.1c`. Upgrade Steam 'n' Rails to `1.5.0`.",
};
}
return null;
};

0 comments on commit 98e6f6b

Please sign in to comment.