mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-09-20 04:53:43 +02:00
fix: only emit closed patches that did not throw an exception with the @Patch
annotation
This commit is contained in:
parent
5c0c0d6c37
commit
5938f6b7ea
1 changed files with 10 additions and 1 deletions
|
@ -2,6 +2,7 @@ package app.revanced.patcher
|
|||
|
||||
import app.revanced.patcher.data.Context
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.extensions.AnnotationExtensions.findAnnotationRecursively
|
||||
import app.revanced.patcher.extensions.PatchExtensions.dependencies
|
||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||
import app.revanced.patcher.extensions.PatchExtensions.requiresIntegrations
|
||||
|
@ -202,7 +203,15 @@ class Patcher(
|
|||
)
|
||||
|
||||
if (returnOnError) return@flow
|
||||
} ?: emit(result)
|
||||
} ?: run {
|
||||
executedPatch
|
||||
.patchInstance::class
|
||||
.java
|
||||
.findAnnotationRecursively(app.revanced.patcher.patch.annotations.Patch::class)
|
||||
?: return@run
|
||||
|
||||
emit(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue