Conversation
There was a problem hiding this comment.
Code Review
This pull request updates environment variable path-list parsing to use OS-native separators (':' on Unix, ';' on Windows), improving Windows compatibility for settings like MISE_TRUSTED_CONFIG_PATHS. It includes documentation updates, new E2E tests, and a list_by_os_path_separator helper. A review comment suggests adding tilde expansion to this helper for consistent path resolution.
Greptile SummaryThis PR fixes Windows path parsing for five path-list env vars ( Confidence Score: 5/5Safe to merge; the one remaining finding is a minor docs display regression with no runtime impact. All runtime changes are correct and well-tested (unit tests for both platforms, Unix e2e, Windows Pester). The only gap is that docs/settings.data.ts — Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Env var e.g. MISE_TRUSTED_CONFIG_PATHS] --> B{Source}
B -->|env.rs early-init| C["var_os() → OsString"]
B -->|confique / settings.rs| D["parse_env = list_by_os_path_separator(str)"]
C --> E["std::env::split_paths()"]
D --> F["std::env::split_paths()"]
E --> G{Platform}
F --> G
G -->|Unix| H["Split on ':'"]
G -->|Windows| I["Split on ';'"]
H --> J["Vec<PathBuf> / BTreeSet<PathBuf>"]
I --> J
Reviews (11): Last reviewed commit: "fix(env): use OS path separator for path..." | Re-trigger Greptile |
381283a to
50a0ab2
Compare
On Windows, absolute paths contain `:` in drive letters (e.g. C:\foo), making `:` the wrong separator for PATH-like environment variable lists. Switch to `std::env::split_paths` / `std::env::join_paths`, which use `;` on Windows and `:` on Unix. Affected env vars: MISE_CEILING_PATHS, MISE_TRUSTED_CONFIG_PATHS, MISE_IGNORED_CONFIG_PATHS, MISE_TASK_DISABLE_PATHS, MISE_SHARED_INSTALL_DIRS. Also: document the OS path separator in each setting's description, update the schema, add e2e tests for the Unix (`:`) and Windows (`;`) separators, and use var_os/split_paths consistently for all five env vars. https://claude.ai/code/session_01S18fPa26YAPQJDp3dnmW77
50a0ab2 to
d24ef59
Compare
### 🐛 Bug Fixes - **(env)** use OS path separator for path-list env vars on Windows by @richardthe3rd in [#9058](#9058) - check all github token sources in 403 rate limit warning by @jdx in [#9121](#9121) ### 📚 Documentation - add settings section for java by @roele in [#9126](#9126) ### 📦 Registry - added podlet by @tony-sol in [#9134](#9134) - add maturin by @Bing-su in [#9113](#9113) ### New Contributors - @Bing-su made their first contribution in [#9113](#9113) ## 📦 Aqua Registry Updates #### Updated Packages (2) - [`fwdcloudsec/granted`](https://github.com/fwdcloudsec/granted) - [`watchexec/watchexec`](https://github.com/watchexec/watchexec)
This pull request standardizes how environment variables that represent lists of file system paths are parsed, ensuring they use the OS-native path separator (
:on Unix,;on Windows) instead of always using a colon. This change improves cross-platform compatibility, particularly for Windows users, and updates documentation, configuration schemas, and tests accordingly.Core logic and parsing improvements:
list_by_os_path_separatorparser that uses the OS-native path separator for environment variables representing path lists, replacing the previous colon-based parsing logic. This is implemented insrc/config/settings.rsand thoroughly tested. [1] [2]src/env.rsforMISE_IGNORED_CONFIG_PATHSandMISE_CEILING_PATHSto usevar_osandsplit_paths, ensuring correct handling of Windows paths. [1] [2]Configuration and schema updates:
settings.tomlto uselist_by_os_path_separatorfor relevant settings (MISE_TRUSTED_CONFIG_PATHS,MISE_IGNORED_CONFIG_PATHS,MISE_CEILING_PATHS,MISE_SHARED_INSTALL_DIRS,MISE_TASK_DISABLE_PATHS), and clarified documentation to specify the OS-native path separator. [1] [2] [3] [4] [5]Testing improvements:
e2e/cli/test_trusted_config_paths,e2e/config/test_config_ignored_paths) and Windows (e2e-win/trusted_config_paths.Tests.ps1) to verify correct parsing and behavior with both single and multiple paths. [1] [2] [3]