fix(zsh): redirect TMPDIR to ~/tmp on TrueNAS hosts#202
Merged
Conversation
TrueNAS mounts /tmp as tmpfs with noexec, which breaks chezmoi's run_* script execution (fork/exec returns EACCES on the materialized script). Override TMPDIR to ~/tmp on the main/home ZFS dataset, which is exec-allowed. Gated on .chezmoi.kernel.osrelease containing "truenas" so the export stays a no-op on macOS and other Linux hosts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
| Status | Count |
|---|---|
| 🔍 Total | 128 |
| ✅ Successful | 121 |
| ⏳ Timeouts | 1 |
| 🔀 Redirected | 0 |
| 👻 Excluded | 5 |
| ❓ Unknown | 0 |
| 🚫 Errors | 1 |
Errors per input
Errors in docs/components.md
- [TIMEOUT] https://www.zsh.org/ | Timeout
Errors in exact_dot_claude/docs/prds/daily-catchup.PRD.md
- [509] https://date-fns.org/ | Failed: Network error: Unknown status code
Full Github Actions output
Please fix the broken links before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/tmpas tmpfs withnoexec, which breaks chezmoi'srun_*scripts (fork/execon the materialized script returns EACCES).TMPDIR=$HOME/tmp(on themain/homeZFS dataset, exec-allowed) when.chezmoi.kernel.osreleasecontainstruenas.Bootstrap
Applying this change itself still needs the workaround once, since the failing script runs before the new
~/.zshenvis in place:TMPDIR="$HOME/tmp" chezmoi apply -vAfter that, every new shell exports
TMPDIRitself and barechezmoi applyworks.Test plan
chezmoi execute-template < dot_zshenv.tmplrenders the export on the TrueNAS host.TMPDIRblock (gated byosreleasesubstring).TMPDIR=$HOME/tmp chezmoi apply -vrunsrun_once_before_00-initial-setup.sh.tmplsuccessfully end-to-end.🤖 Generated with Claude Code