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 <noreply@anthropic.com>
This commit is contained in:
2026-08-18 23:00:36 +02:00
co-authored by Claude Sonnet 5
parent a4e2eadbe9
commit 75ae00ce12
2 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -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"
+3 -2
View File
@@ -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"