From bfa49d6546bd807a5fc98a306c3f1892030da55b Mon Sep 17 00:00:00 2001 From: rain Date: Thu, 27 Aug 2026 21:58:38 -0400 Subject: [PATCH] topgrade: gate neovim tarball updater to debian family only update-neovim.sh and the topgrade [commands] entry that calls it are only meaningful where neovim is not a distro package. On arch-family boxes the template renders empty, so chezmoi removes the script instead of deploying a no-op, and topgrade no longer runs a step that could fail on unmanaged paths. --- dot_config/topgrade/{topgrade.toml => topgrade.toml.tmpl} | 7 +++++-- dot_local/bin/{update-neovim.sh => update-neovim.sh.tmpl} | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) rename dot_config/topgrade/{topgrade.toml => topgrade.toml.tmpl} (82%) rename dot_local/bin/{update-neovim.sh => update-neovim.sh.tmpl} (96%) diff --git a/dot_config/topgrade/topgrade.toml b/dot_config/topgrade/topgrade.toml.tmpl similarity index 82% rename from dot_config/topgrade/topgrade.toml rename to dot_config/topgrade/topgrade.toml.tmpl index 11419a8..7ffa98c 100644 --- a/dot_config/topgrade/topgrade.toml +++ b/dot_config/topgrade/topgrade.toml.tmpl @@ -31,8 +31,11 @@ repos = [ "~/Documents/Git/*" ] +{{- if eq .os_family "debian" }} [commands] -# Debian-only (script no-ops elsewhere): apt neovim is stale, so debian -# machines install from the pinned binary tarball. Arch uses pacman. +# Debian-family-only: apt neovim is stale, so debian machines install from +# the pinned binary tarball. Arch-family boxes get neovim from pacman/aur, +# so neither the script nor this entry is deployed there. "~/.local/bin/update-neovim.sh" = "neovim" +{{- end }} diff --git a/dot_local/bin/update-neovim.sh b/dot_local/bin/update-neovim.sh.tmpl similarity index 96% rename from dot_local/bin/update-neovim.sh rename to dot_local/bin/update-neovim.sh.tmpl index a605111..087b485 100755 --- a/dot_local/bin/update-neovim.sh +++ b/dot_local/bin/update-neovim.sh.tmpl @@ -1,3 +1,4 @@ +{{- if eq .os_family "debian" }} #!/usr/bin/env bash # ============================================================================= # update-neovim.sh — chezmoi-managed, deployed to ~/.local/bin/update-neovim.sh @@ -65,4 +66,5 @@ sudo tar -xzf "$TMP_TARBALL" -C /opt/ sudo ln -sf "/opt/${NVIM_EXTRACT_DIR}/bin/nvim" /usr/local/bin/nvim echo "neovim $NVIM_TARGET_VERSION installed" -nvim --version | head -1 \ No newline at end of file +nvim --version | head -1 +{{- end }} \ No newline at end of file