Fix choco updater failing

This commit is contained in:
crschnick 2023-08-20 01:44:18 +00:00
parent f0e8385e2b
commit 0cd8a0916b

View file

@ -35,13 +35,16 @@ public class ChocoUpdater extends UpdateHandler {
.lines() .lines()
.filter(s -> s.startsWith("xpipe")) .filter(s -> s.startsWith("xpipe"))
.findAny() .findAny()
.orElseThrow() .map(string -> string.split("\\|")[2]);
.split("\\|")[2]; if (latest.isEmpty()) {
var isUpdate = isUpdate(latest); return null;
}
var isUpdate = isUpdate(latest.get());
var rel = new AvailableRelease( var rel = new AvailableRelease(
AppProperties.get().getVersion(), AppProperties.get().getVersion(),
XPipeDistributionType.get().getId(), XPipeDistributionType.get().getId(),
latest, latest.get(),
"https://community.chocolatey.org/packages/xpipe/" + latest, "https://community.chocolatey.org/packages/xpipe/" + latest,
null, null,
null, null,