Skip to content

Clean up third-party update temporary file - #34068

Open
luojiyin1987 wants to merge 1 commit into
uBlockOrigin:masterfrom
luojiyin1987:agent/cleanup-update-3rdparties-temp
Open

Clean up third-party update temporary file#34068
luojiyin1987 wants to merge 1 commit into
uBlockOrigin:masterfrom
luojiyin1987:agent/cleanup-update-3rdparties-temp

Conversation

@luojiyin1987

Copy link
Copy Markdown

Part of #34067.

Summary

Register an EXIT trap for the download temporary file.
The trap removes the file on normal exit, failure, or interruption.

Root cause

The script created one file with mktemp.
It did not remove that file at the end.

Impact

The script no longer leaves its download file in the temporary directory.
The download and asset update behavior stays unchanged.

Checks

  • bash -n tools/update-3rdparties.sh
  • git diff --check
  • A mocked download 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:24
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