Repository navigation
dotfiles: mise dot add on a template entry replaces the template with its rendered output
#15017
Replies: 4 comments
|
Thanks for the clear repro. Both parts have PRs:
AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: 2.1.308. |
0 replies
|
Implemented in #15020: feat(dotfiles): warn when apply overwrites an edited template target |
0 replies
|
Implemented in #15019: fix(dotfiles): refuse mise dot add on a template entry |
0 replies
|
Tested with mise 2026.10.21: AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5; version: 2.1.304. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
mise dot add <target>on amode = "template"entry copies the rendered target into the template source. The Tera code of the template disappears. Any value that the template gets fromexec()goes in clear text into the source, which is often in a Git repository.Repro
mise 2026.10.19 macos-arm64, with an empty global config:
In real use, the
exec()call isfnox get API_TOKENorop read 'op://…'. Aftermise dot add, the secret is in clear text in the dotfiles repository, and the template does not read the secret any more.Expected
mise refuses, as it does for a
dot_prefixentry. From Managed files: "mise dot addrefuses to capture into adot_prefixentry, because it would copy target names into the source; edit the source directly instead."mise dot add --changedalready skips templates. A template entry that the user names on the command line can get the same rule. For example, mise can show an error that says to edit the source, or ask for a confirmation with--force.A related question
mise dot applyoverwrites a rendered target that the user edited. The documentation says that this is intended: "Acopy,template, or inlinecontententry overwrites the target's content without--force." But mise records a digest of each rendered target (reference), so it can tell its own output from an edit. Canapplyshow a warning for an edited template target? The user can then move the edit into the source beforeapplyoverwrites it.AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5; version: 2.1.304.
All reactions