From 75ae00ce12b7f5cfb35d9921e9d9fa3b319f44db Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Tue, 18 Aug 2026 23:00:36 +0200 Subject: [PATCH] fix(mise): Trigger mise install when templated config data changes run_onchange_after_mise-install.sh.tmpl hashed the raw contents of config.toml.tmpl to detect changes, but that file only pulls in real content through named templates ({{ template "..." }}) fed by .chezmoidata. Editing that data left the raw .tmpl text (and thus the hash) unchanged, so mise install silently stopped firing. Switch the named-template calls to includeTemplate, which chezmoi can resolve outside the normal source-state parsing pass (unlike the template action, see https://github.com/twpayne/chezmoi/issues/3334). This lets the run_onchange script hash the actual rendered output via includeTemplate instead of the static source text. Co-Authored-By: Claude Sonnet 5 --- private_dot_config/mise/config.toml.tmpl | 6 +++--- run_onchange_after_mise-install.sh.tmpl | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/private_dot_config/mise/config.toml.tmpl b/private_dot_config/mise/config.toml.tmpl index 457fa00..1bf2f02 100644 --- a/private_dot_config/mise/config.toml.tmpl +++ b/private_dot_config/mise/config.toml.tmpl @@ -1,4 +1,4 @@ -{{ template "chezmoi-managed-header" . }} +{{ includeTemplate "chezmoi-managed-header" . }} [settings] experimental = true @@ -9,7 +9,7 @@ binstall = true ######################### [ Bootstrap ] ######################### [bootstrap.packages] -{{ template "mise-bootstrap-packages" . }} +{{ includeTemplate "mise-bootstrap-packages" . }} # coreutils grep less # tig @@ -36,7 +36,7 @@ neovim = "latest" tree-sitter = "latest" # Tools automated with chezmoi -{{ template "mise-tools" . }} +{{ includeTemplate "mise-tools" . }} # Password managers # vault = "latest" diff --git a/run_onchange_after_mise-install.sh.tmpl b/run_onchange_after_mise-install.sh.tmpl index 8f1d17b..c121231 100644 --- a/run_onchange_after_mise-install.sh.tmpl +++ b/run_onchange_after_mise-install.sh.tmpl @@ -1,6 +1,7 @@ #!/usr/bin/env bash -# Déclencheur automatique : ce script se réexécutera si le config.toml de mise change. -# hash: {{ include "private_dot_config/mise/config.toml.tmpl" | sha256sum }} +# Déclencheur automatique : ce script se réexécutera si le config.toml de mise change, +# y compris quand seules les données (.chezmoidata) utilisées par ses templates changent. +# hash: {{ includeTemplate "private_dot_config/mise/config.toml.tmpl" . | sha256sum }} export PATH="${HOME}/.local/bin:$PATH"