added windows compatibility

This commit is contained in:
partisan 2025-01-06 23:18:05 +01:00
parent ea4f2edcfd
commit a6d2d75c45
3 changed files with 93 additions and 78 deletions

View file

@ -87,8 +87,9 @@ func applyPatchWrapper(patchPath, rootPath string, successfulPatches, failedPatc
fmt.Printf("Applying patch: %s\n", patchPath)
err := applyPatch(patchPath, rootPath)
if err != nil {
fmt.Printf("Failed to apply patch %s: %v\n", patchPath, err)
*failedPatches = append(*failedPatches, patchPath)
errorMsg := fmt.Sprintf("Failed to apply patch '%s': %v", patchPath, err)
fmt.Println(errorMsg)
*failedPatches = append(*failedPatches, errorMsg) // Log detailed error message
} else {
fmt.Printf("Successfully applied patch: %s\n", patchPath)
*successfulPatches = append(*successfulPatches, patchPath)