Skip to content

Clean up diff patch temporary file - #34069

Open
luojiyin1987 wants to merge 1 commit into
uBlockOrigin:masterfrom
luojiyin1987:agent/cleanup-make-diffpatch-temp
Open

Clean up diff patch temporary file#34069
luojiyin1987 wants to merge 1 commit into
uBlockOrigin:masterfrom
luojiyin1987:agent/cleanup-make-diffpatch-temp

Conversation

@luojiyin1987

Copy link
Copy Markdown

Part of #34067.

Summary

Register an EXIT trap for the RCS diff temporary file.
Remove the normal-path cleanup at the end.
The trap now handles every exit path.

Root cause

The script only removed the file after all commands succeeded.
The set -e option can stop the script before that cleanup.

Impact

Early failures and interruptions no longer leave the diff file behind.
Patch generation behavior stays unchanged.

Checks

  • bash -n tools/make-diffpatch.sh
  • git diff --check
  • A forced Git failure leaves the file with the original script.
  • The same failure removes the file with the updated script.

@luojiyin1987
luojiyin1987 marked this pull request as ready for review August 11, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant