Repository navigation
Replies: 1 comment 1 reply
|
Both halves are implemented:
With both, your config collapses to one file and no per-platform [bootstrap.user]
login_shell = "{{ system_brew_prefix }}/bin/zsh"
[env]
PKG_CONFIG_PATH = "{{ system_brew_prefix }}/opt/mysql-client/lib/pkgconfig{% if env.PKG_CONFIG_PATH %}:{{ env.PKG_CONFIG_PATH }}{% endif %}"Note the variable reports mise's own prefix; it does not detect a Homebrew install elsewhere (e.g. Intel AI-assisted — Tool: Claude Code; model: Anthropic/Claude Sonnet 5.5; version: unavailable. |
1 reply
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.
Thanks for all your work on mise. I'm using it to manage my dotfiles across macOS and Linux, and I'd like to ask about two related limitations I've run into.
The problem
I'd like to reuse the system Homebrew prefix in multiple parts of my configuration, but currently I maintain it separately for each platform. I also haven't found a way to expand
[vars]values inbootstrap.user.login_shell.For example, my configuration looks like this:
Ideally, I'd like to be able to:
[vars]value for each platform.[vars]values inbootstrap.user.login_shell, avoiding the need to repeat the prefix there.What I've found
While looking into this, I found that mise's built-in Homebrew implementation resolves the prefix in
src/system/packages/brew/prefix.rs:mise/src/system/packages/brew/prefix.rs
Lines 34 to 42 in de92267
The
prefix()function usesMISE_SYSTEM_BREW_PREFIXwhen set, and otherwise selects a platform-specific default.I also looked at how
bootstrap.user.login_shellis defined inBootstrapUserTomlConfig. Unlike fields that use theTemplated<T>wrapper,login_shellis defined as a plainOption<String>:mise/src/system/mod.rs
Lines 503 to 508 in de92267
I wondered whether this difference might explain why
{{ vars.homebrew_prefix }}isn't expanded inbootstrap.user.login_shell.A question about the best approach
Would it make sense to expose the resolved system Homebrew prefix to templates, for example as
{{ system_brew_prefix }}, and allow[vars]values to be used inbootstrap.user.login_shellas well?These are just ideas based on my use case, and I'm not attached to a particular variable name or implementation. If there's a more suitable way to achieve this within mise's existing design, I'd be glad to hear your thoughts.
Thanks for considering this!
AI-assisted — Tool: ChatGPT; model: OpenAI/GPT-6.
All reactions