Skip to content

fix: add trap handler for tmpfile cleanup in macOS installer#11

Open
boffin-dmytro wants to merge 2 commits intomainfrom
fix/macos-tmpfile-cleanup
Open

fix: add trap handler for tmpfile cleanup in macOS installer#11
boffin-dmytro wants to merge 2 commits intomainfrom
fix/macos-tmpfile-cleanup

Conversation

@boffin-dmytro
Copy link
Copy Markdown
Owner

Summary

Adds trap handler to macOS installer for proper temporary file cleanup on interruption.

Changes

  • installers/macos/install-macos.sh: Add trap handler for OpenCode install script cleanup

Problem Solved

Completes the tmpfile cleanup coverage started in PR #10. The macOS installer was missing trap handlers for the OpenCode installation temporary file, which could be left behind if:

  • User interrupts installation (Ctrl+C)
  • Network timeout causes script termination
  • System receives TERM signal during installation

Benefits

  • Resource cleanup: Prevents /tmp pollution from interrupted installs
  • Security: Removes potentially sensitive install scripts from filesystem
  • Consistency: All installers now use the same trap handler pattern

Related

@boffin-dmytro boffin-dmytro force-pushed the main branch 2 times, most recently from 5a4c90a to 28da306 Compare March 19, 2026 05:47
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