Skip to content

Commit

Permalink
fix: returning failure on success
Browse files Browse the repository at this point in the history
oh wow, that's an oopsie
  • Loading branch information
Sculas authored and oSumAtrIX committed Jun 5, 2022
1 parent c63b20f commit 48c4ea2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/app/revanced/patcher/Patcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 48c4ea2

Please sign in to comment.