Skip to content

Add stdlib cleanup hooks#56

Merged
codeforester merged 2 commits into
enhancement/50-20260621-stdlib-loaded-guardfrom
enhancement/54-20260621-stdlib-cleanup-traps
Jun 21, 2026
Merged

Add stdlib cleanup hooks#56
codeforester merged 2 commits into
enhancement/50-20260621-stdlib-loaded-guardfrom
enhancement/54-20260621-stdlib-cleanup-traps

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

Summary

  • Add shared EXIT cleanup registration for function hooks and cleanup paths.
  • Preserve an existing EXIT trap when stdlib cleanup is first registered.
  • Document the cleanup helper contract and add focused BATS coverage.

Validation

  • bats lib/bash/std/tests/lib_std.bats
  • ./tests/validate.sh
  • git diff --check

Stacked on #55.
Fixes #54

@codeforester codeforester marked this pull request as ready for review June 21, 2026 05:03
## Summary
- Add std_make_temp_file and std_make_temp_dir helpers backed by
portable mktemp templates.
- Register created paths for EXIT cleanup by default, with --keep for
caller-owned cleanup.
- Document the temp helper contract and add focused BATS coverage.

## Validation
- bats lib/bash/std/tests/lib_std.bats
- ./tests/validate.sh
- git diff --check

Stacked on #56.
Fixes #53
@codeforester codeforester merged commit 39bdf8d into enhancement/50-20260621-stdlib-loaded-guard Jun 21, 2026
2 checks passed
@codeforester codeforester deleted the enhancement/54-20260621-stdlib-cleanup-traps branch June 21, 2026 05:07
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