Skip to content

fix(config): restore MISE_ENV_FILE setting#9903

Merged
jdx merged 3 commits into
jdx:mainfrom
risu729:fix/restore-mise-env-file
May 18, 2026
Merged

fix(config): restore MISE_ENV_FILE setting#9903
jdx merged 3 commits into
jdx:mainfrom
risu729:fix/restore-mise-env-file

Conversation

@risu729

@risu729 risu729 commented May 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove the deprecation metadata from the env_file setting / MISE_ENV_FILE
  • restore global config docs for [settings] env_file = ".env"
  • clarify that MISE_ENV_FILE loads all matching files found from the current directory upward, unlike env._.file paths in config files

Context

Discussion: #9897

env._.file is still the right replacement for legacy top-level env_file entries in mise.toml, but it is not a behaviorally equivalent replacement for MISE_ENV_FILE=.env because the setting uses FindUp from the current directory.

Testing

  • mise run render:schema
  • PR CI passed: docs, lint, Linux/macOS/Windows unit and e2e jobs, nightly, benchmark, registry, release, and Socket checks.
  • A local focused e2e run was attempted, but I stopped it after it sat behind shared Cargo build contention for ~19 minutes; the PR CI covered those paths.

This pull request was generated by an AI coding assistant.

@greptile-apps

greptile-apps Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR restores env_file / MISE_ENV_FILE as a first-class (non-deprecated) setting, clarifying that it uses FindUp semantics (loads matching files from the current directory upward) rather than config-file-relative resolution like env._.file.

  • settings.toml: Deprecation fields (deprecated, deprecated_warn_at, deprecated_remove_at) removed from [env_file]; [profile]'s deprecation message is updated but still references the wrong env var (MISE_ENV instead of MISE_PROFILE).
  • docs/: MISE_ENV_FILE deprecation notice removed in configuration.md; environments/index.md updated to present MISE_ENV_FILE / [settings] env_file as the recommended approach for FindUp dotenv loading.
  • schema/mise.json: \"deprecated\": true removed from the env_file entry, consistent with the restored status.

Confidence Score: 4/5

The env_file restoration is correct and well-executed; a stale incorrect deprecation message on the unrelated profile setting will mislead users who encounter that warning.

The profile setting's deprecation message was changed to "Use MISE_ENV instead.", but MISE_ENV is unrelated to profile config files — the setting's own env field already documents MISE_PROFILE as the correct env var. A user who sees this deprecation warning and follows it will configure the wrong thing.

settings.toml — the [profile] deprecation message points to the wrong replacement.

Important Files Changed

Filename Overview
settings.toml Removes deprecation metadata from env_file (correct); profile's new deprecation message "Use MISE_ENV instead." points to the wrong env var — the setting already reads from MISE_PROFILE, not MISE_ENV.
docs/configuration.md Removes deprecation notice for MISE_ENV_FILE, adds FindUp clarification, swaps the global-config example from [env] _.file to [settings] env_file.
docs/environments/index.md Replaces deprecation warning with a clear explanation distinguishing MISE_ENV_FILE/env_file (FindUp) from env._.file (config-relative path).
schema/mise.json Removes "deprecated": true from the env_file schema entry, consistent with restoring the setting.

Reviews (3): Last reviewed commit: "docs(config): clarify MISE_ENV_FILE find..." | Re-trigger Greptile

Comment thread settings.toml Outdated

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request undeprecates the env_file setting, removing related deprecation notices from the schema and configuration files. The review feedback identifies a misleading deprecation message for the profile setting, suggesting MISE_ENV as the correct replacement, and recommends clarifying the documentation to explicitly state that MISE_ENV_FILE loads all matching files found in the directory hierarchy.

Comment thread settings.toml Outdated
Comment thread docs/configuration.md Outdated
Comment thread docs/environments/index.md Outdated
@risu729 risu729 marked this pull request as ready for review May 16, 2026 08:14
@risu729 risu729 marked this pull request as draft May 16, 2026 08:25
@risu729 risu729 marked this pull request as ready for review May 16, 2026 09:11
@risu729 risu729 force-pushed the fix/restore-mise-env-file branch from 18f5eb6 to 59e7315 Compare May 18, 2026 10:30
@jdx jdx merged commit 0037d20 into jdx:main May 18, 2026
33 checks passed
@risu729 risu729 deleted the fix/restore-mise-env-file branch May 18, 2026 16:25
mise-en-dev added a commit that referenced this pull request May 19, 2026
### 🚀 Features

- **(cli)** rename before flag to minimum release age by @risu729 in
[#9768](#9768)
- **(core)** deprecate default package files by @jdx in
[#9970](#9970)
- **(edit)** add --global flag for editing the global config file by
@fru1tworld in [#9953](#9953)

### 🐛 Bug Fixes

- **(aqua)** support cosign public-key bundles by @jdx in
[#9972](#9972)
- **(backend)** pass install_env to postinstall by @risu729 in
[#9930](#9930)
- **(backend)** apply install_env to install commands by @risu729 in
[#9929](#9929)
- **(cargo)** skip binstall for cargo install options by @risu729 in
[#9928](#9928)
- **(config)** restore MISE_ENV_FILE setting by @risu729 in
[#9903](#9903)

### 🚜 Refactor

- **(cli)** use tool wording in version env help by @risu729 in
[#9906](#9906)
- **(conda)** parse tool options locally by @risu729 in
[#9960](#9960)
- **(core)** parse plugin tool options locally by @risu729 in
[#9963](#9963)
- **(go)** parse tool options locally by @risu729 in
[#9961](#9961)
- **(http)** parse tool options locally by @risu729 in
[#9870](#9870)

### 📦️ Dependency Updates

- lock file maintenance by @renovate[bot] in
[#9954](#9954)
- lock file maintenance by @renovate[bot] in
[#9957](#9957)

### 📦 Registry

- use aqua backend for qsv by @risu729 in
[#9910](#9910)

### Ci

- build/publish snap package for arm64 by @jnsgruk in
[#9948](#9948)

### New Contributors

- @jnsgruk made their first contribution in
[#9948](#9948)

## 📦 Aqua Registry Updates

### New Packages (2)

- [`AOMediaCodec/libavif`](https://github.com/AOMediaCodec/libavif)
- [`julian7/redact`](https://github.com/julian7/redact)

### Updated Packages (1)

- [`apache/jena`](https://github.com/apache/jena)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants