Repository navigation
Replies: 2 comments 2 replies
|
Yes, the difference is intentional, because these are two separate features rather than an old and a new spelling of one thing.
So moving a global The docs called them "the same", which was misleading, so #14602 corrects that and states the precedence. AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: 2.1.299. |
|
Implemented in #14602: docs(env): explain env_file and _.file find_up are different features |
Uh oh!
There was an error while loading. Please reload this page.
Following #14497, I wanted to replace this global configuration:
With:
Both discover
.envfiles in the current directory and its ancestors. However, their precedence relative to project[env]values differs.For example, given this project
mise.toml:And a
.envin the same project:Running
mise env --dotenvinside the project on mise2026.10.12gives:settings.env_file:EXAMPLE=dotenvenv._.fileandfind_up = true:EXAMPLE=projectThese are alternative configurations; the old setting is removed when testing the new form.
From the implementation, it appears
settings.env_fileloads after configuration environment directives, while a globalenv._.fileentry participates in normal configuration ordering and can therefore be overridden by project[env]values.Is this difference intentional?
My use case is configuring automatic dotenv loading globally without adding configuration to every repository. If a project declares development defaults and my ignored
.envcontains machine-specific values, I would usually expect the.envvalues to override those defaults.The new syntax is useful because it supports multiple filenames, such as
.envand.env.local, but migrating can change which values commands receive.Could we clarify:
This also seems relevant before recommending
env._.filewithfind_upas a replacement forsettings.env_file, or considering deprecation of the old setting.All reactions