Skip to content

Commit 6ad6837

Browse files
authored
fix: Allow any number for minor version number (#423)
Currently only numbers 1-4 are allowed in the minor version number. Since Unity 6, also the number 0 is used (6000.0). This commit changes the regex for the minor version number to include any number, which fixes support for Unity 6 and is more permissive in case any other numbers are used by Unity in the future.
1 parent bb2ab04 commit 6ad6837

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/domain/editor-version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const tryParseEditorVersion = function (
128128
locBuild?: `${number}`;
129129
};
130130
const regex =
131-
/^(?<major>\d+)\.(?<minor>[1234])(\.(?<patch>\d+)((?<flag>a|b|f|c)(?<build>\d+)((?<loc>c)(?<locBuild>\d+))?)?)?/;
131+
/^(?<major>\d+)\.(?<minor>\d+)(\.(?<patch>\d+)((?<flag>a|b|f|c)(?<build>\d+)((?<loc>c)(?<locBuild>\d+))?)?)?/;
132132
const match = regex.exec(version);
133133
if (!match) return null;
134134
const groups = <RegexMatchGroups>match.groups;

0 commit comments

Comments
 (0)