Skip to content

Commit

Permalink
Fix: Failed to apply patch. stdout: The next patch would create the f…
Browse files Browse the repository at this point in the history
…ile /tmp/tmpy0d9mb0r, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored
  • Loading branch information
hiroshinishio committed Jul 9, 2024
1 parent 7a1fede commit 5d5a1fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def apply_patch(original_text: str, diff_text: str) -> str:
cmd, code = " ".join(e.cmd), e.returncode

# Check if the error message indicates that the patch was already applied
if "which already exists! assume -r? [n]" in stdout.lower():
if "which already exists!" in stdout.lower():
return ""

# Get the original, diff, and reject file contents for debugging
Expand Down

0 comments on commit 5d5a1fa

Please sign in to comment.