fix: only close succeeded patches

This commit is contained in:
oSumAtrIX 2023-06-14 01:43:19 +02:00
parent 5650e34432
commit b8151ebccb
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -364,7 +364,7 @@ class Patcher(private val options: PatcherOptions) {
if (stopOnError && patchResult.isError()) return@sequence
}
} finally {
executedPatches.values.reversed().forEach { (patch, _) ->
executedPatches.values.filter { it.success }.reversed().forEach { (patch, _) ->
patch.close()
}
}