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:
@@ -1,4 +1,4 @@
|
|||||||
{{ template "chezmoi-managed-header" . }}
|
{{ includeTemplate "chezmoi-managed-header" . }}
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
experimental = true
|
experimental = true
|
||||||
@@ -9,7 +9,7 @@ binstall = true
|
|||||||
######################### [ Bootstrap ] #########################
|
######################### [ Bootstrap ] #########################
|
||||||
|
|
||||||
[bootstrap.packages]
|
[bootstrap.packages]
|
||||||
{{ template "mise-bootstrap-packages" . }}
|
{{ includeTemplate "mise-bootstrap-packages" . }}
|
||||||
|
|
||||||
# coreutils grep less
|
# coreutils grep less
|
||||||
# tig
|
# tig
|
||||||
@@ -36,7 +36,7 @@ neovim = "latest"
|
|||||||
tree-sitter = "latest"
|
tree-sitter = "latest"
|
||||||
|
|
||||||
# Tools automated with chezmoi
|
# Tools automated with chezmoi
|
||||||
{{ template "mise-tools" . }}
|
{{ includeTemplate "mise-tools" . }}
|
||||||
|
|
||||||
# Password managers
|
# Password managers
|
||||||
# vault = "latest"
|
# vault = "latest"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Déclencheur automatique : ce script se réexécutera si le config.toml de mise change.
|
# 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 }}
|
# 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"
|
export PATH="${HOME}/.local/bin:$PATH"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user