fix: returning failure on success

oh wow, that's an oopsie
This commit is contained in:
Lucaskyy 2022-04-09 00:03:21 +02:00 committed by oSumAtrIX
parent c63b20fa65
commit 48c4ea2f6d
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -85,7 +85,7 @@ class Patcher(
for (patch in patches) {
val result: Result<PatchResult> = try {
val pr = patch.execute(cache)
if (!pr.isSuccess()) {
if (pr.isSuccess()) {
Result.success(pr)
} else {
Result.failure(Exception(pr.error()?.errorMessage() ?: "Unknown error"))