feat: only log when a patch fails

This commit is contained in:
Canny 2022-10-07 14:11:11 +03:00 committed by GitHub
parent c179a9f012
commit 2959821a96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,13 +149,14 @@ class PatcherWorker(context: Context, parameters: WorkerParameters, private val
Logging.log += "Merging integrations\n"
patcher.addFiles(listOf(integrations)) {}
Logging.log += "Applying ${patches.size} patch(es)"
patcher.executePatches().forEach { (patch, result) ->
Logging.log += "Applying $patch\n"
if (result.isSuccess) {
Logging.log += "$patch has been applied successfully\n"
if (result.isFaliure) {
Logging.log += "Failed to apply $patch \n" + result.exceptionOrNull()!!.message
return@forEach
}
Logging.log += "Failed to apply $patch \n" + result.exceptionOrNull()!!
}
Logging.log += "Saving file\n"