fix(chezmoi): unbreak chezmoi apply (tmux backend + completions set -e)#195
Merged
Conversation
Two failures surfaced by `chezmoi apply`: - mise's default tmux backend is `asdf:mise-plugins/mise-tmux`, which builds from source and was failing on tmux 3.6a. Switch to `aqua:tmux/tmux-builds` for prebuilt binaries with checksum verification, matching the documented backend priority (aqua > asdf). - `run_onchange_02-generate-completions.sh.tmpl` runs under `set -euo pipefail`. `((skipped++))` returns exit 1 when `skipped` is 0 (bash arithmetic returns nonzero when result is 0), so the first not-found tool killed the whole script. Replace with `skipped=$((skipped + 1))` (assignment is always exit 0).
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
Two failures surfaced by
chezmoi applyin this morning's run:tmux: mise's default backend resolves toasdf:mise-plugins/mise-tmux, which builds from source and was failing on 3.6a (asdf-tmux: An error occurred while installing tmux 3.6a). Switched toaqua:tmux/tmux-buildsfor prebuilt binaries with checksum verification — matches the documented backend priority (aqua > asdf).run_onchange_02-generate-completions.sh.tmpl: script runs underset -euo pipefail, and((skipped++))exits 1 whenskippedis0(bash arithmetic returns nonzero when the resulting value is 0). The very first not-found tool (aider) killed the whole completions pass. Swapped both((generated++))and((skipped++))forvar=$((var + 1))(assignment is always exit 0).Test plan
chezmoi diff ~/.config/mise/config.tomlshows the expected single-line backend swapchezmoi applycompletes both01-update-packages.sh(tmux installs cleanly via aqua) and02-generate-completions.sh(no early exit on missing tools)tmux -Vreports 3.6a and the binary lives under~/.local/share/mise/installs/aqua-tmux-tmux-builds/~/.zfunc/repopulates for all installed completion tools (not just up to the first missing one)🤖 Generated with Claude Code