diff --git a/AGENTS.md b/AGENTS.md index 4c3c18b..de56b6d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -58,6 +58,12 @@ fallback and the unapplied-pins path - 28 cells total. list with a per-package retry, keep an optional tool's apt steps non-fatal (`|| { log_warn ...; return; }`), and let the `_install_*` GitHub fallbacks cover whatever apt cannot supply. +- **Do not configure what is not installed.** `install_zsh` and `install_tmux` both + return early with an actionable warning when their binary is absent; a host that + looks configured while nothing can use it is how the no-sudo tmux gap stayed + invisible. Guard EVERY entry point, not just the first: install.sh chains + `install_tmux && _install_tmux_plugins`, and the early return must exit 0 or + `set -e` kills the run - so the chained function needs its own guard. - **Never let a test environment supply the thing under test** (`tests/no-fixture-masking.py` enforces this for tools with an `_install_*` function; it cannot see a tool the repo ships config for but never installs, which is what the original gap was). The no-sudo CI jobs and `Dockerfile.nosudo` pre-installed tmux as a root prerequisite, so `has tmux` was true before install.sh ran. A non-sudoer therefore got tmux CONFIG and tmux diff --git a/CHANGELOG.md b/CHANGELOG.md index 4af8bad..ab62e9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.13.2] - 2026-09-19 + +### Fixed +- install.sh no longer links tmux config or clones tmux plugins when tmux is absent. It configured a tmux that was not there whenever the installer came up empty - a non-x86_64 host, a download failure, an AppImage that neither runs nor extracts - which is the incoherence that hid the original no-sudo gap. Matches how zsh is already handled. + ## [1.13.1] - 2026-09-19 ### Added diff --git a/VERSION b/VERSION index b50dd27..61ce01b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.13.1 +1.13.2 diff --git a/modules/tmux.sh b/modules/tmux.sh index 8803e41..21bed24 100755 --- a/modules/tmux.sh +++ b/modules/tmux.sh @@ -10,6 +10,17 @@ _TMUX_PLUGINS=( ) install_tmux() { + # Do not configure what is not there. Linking tmux config and cloning tmux + # plugins for an absent tmux is the incoherence that hid the no-sudo gap: a + # host looked configured while nothing could use it. _install_tmux covers the + # common cases now, but it still returns empty-handed on a non-x86_64 host, on + # a download failure, or when the AppImage neither runs nor extracts - so this + # guard is what makes the outcome honest. Same shape as install_zsh(). + if ! has tmux; then + log_warn "tmux not found - skipping tmux config and plugins" + log_warn " Install tmux, then re-run: bash ${DOTFILES_DIR}/install.sh" + return 0 + fi log_step "tmux config" symlink "${DOTFILES_DIR}/tmux/.tmux.conf" ~/.tmux.conf symlink "${DOTFILES_DIR}/tmux/.tmux.conf.local" ~/.tmux.conf.local @@ -20,6 +31,13 @@ install_tmux() { } _install_tmux_plugins() { + # Guarded separately, not just via install_tmux: install.sh chains them with + # `install_tmux && _install_tmux_plugins`, so install_tmux's early return - which + # must exit 0, or `set -e` would kill the whole install - still lets this run. + if ! has tmux; then + log_warn "tmux not found - skipping tmux plugins" + return 0 + fi log_step "tmux plugins" local plugin_dir="$HOME/.tmux/plugins" mkdir -p "$plugin_dir"