refactor(setup): let mise create ~/.config/mise instead of ln - #89
Merged
Conversation
~/.config/mise is declared in [dotfiles], so hand-rolling it with `ln` duplicated a managed path -- the same smell already removed for ~/.dot-files. It was not actually unavoidable: MISE_CONFIG_DIR points mise straight at the config inside the clone, and mise then creates both symlinks from its own entries. The result is also more correct. mise writes ~/.config/mise -> ~/.dot-files/config/mise, honouring dotfiles.root, where the hand-rolled link pointed at the repo path and bypassed it. Applied one target per invocation, in order: mise validates the sources of every target named in a single call, so naming both at once fails on ~/.config/mise's source living under ~/.dot-files, which does not exist yet. MISE_CONFIG_DIR is unset afterwards so the rest of the run reads config through the symlink, exactly as a normal invocation does. Note MISE_GLOBAL_CONFIG_FILE is not a substitute: it swaps only config.toml and still loads ~/.config/mise/conf.d/*. MISE_CONFIG_DIR redirects the whole directory, conf.d included. setup.sh is now down to two genuinely imperative steps: clone, and install mise. Verified end to end against a HOME with no .config directory at all.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
~/.config/mise is declared in [dotfiles], so hand-rolling it with
lnduplicated a managed path -- the same smell already removed for ~/.dot-files. It was not actually unavoidable: MISE_CONFIG_DIR points mise straight at the config inside the clone, and mise then creates both symlinks from its own entries.The result is also more correct. mise writes
~/.config/mise -> ~/.dot-files/config/mise, honouring dotfiles.root, where the hand-rolled link pointed at the repo path and bypassed it.
Applied one target per invocation, in order: mise validates the sources of every target named in a single call, so naming both at once fails on ~/.config/mise's source living under ~/.dot-files, which does not exist yet. MISE_CONFIG_DIR is unset afterwards so the rest of the run reads config through the symlink, exactly as a normal invocation does.
Note MISE_GLOBAL_CONFIG_FILE is not a substitute: it swaps only config.toml and still loads ~/.config/mise/conf.d/*. MISE_CONFIG_DIR redirects the whole directory, conf.d included.
setup.sh is now down to two genuinely imperative steps: clone, and install mise. Verified end to end against a HOME with no .config directory at all.