mirror of
https://github.com/gitnex-org/gitnex.git
synced 2026-03-24 07:10:45 -05:00
Fix invalid version detection (#1116)
Co-authored-by: qwerty287 <ndev@web.de> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1116 Reviewed-by: M M Arif <mmarif@noreply.codeberg.org> Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org> Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
@@ -51,7 +51,10 @@ public class Version {
|
||||
|
||||
final Pattern patternNumberDotNumber = Pattern.compile("^\\d+(\\.(\\d)+)*");
|
||||
|
||||
if(!valid(raw) || raw.equals("main")) {
|
||||
if(!valid(raw)) {
|
||||
throw new IllegalArgumentException("Invalid version format: " + raw);
|
||||
}
|
||||
if(raw.equals("main")) {
|
||||
dev = true;
|
||||
values = new ArrayList<>();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user