mirror of https://codeberg.org/gitnex/GitNex.git
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:
parent
269f1fb32b
commit
685844d41f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue