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
parent eed1cfda7b
commit 3b68d5c65e
No known key found for this signature in database
GPG key ID: 1530BFF96D1EEB89

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"))