mirror of
https://github.com/nushell/nushell
synced 2025-01-19 00:24:10 +00:00
a7b281292d
It turns out that my previous PR, https://github.com/nushell/nushell/pull/11999, didn't properly canonicalize `$nu.default-config-dir` in a scenario where `XDG_CONFIG_HOME` (or the equivalent on each platform) was a symlink. To remedy that, this PR makes `nu_path::config_dir()` return a canonicalized path. This probably shouldn't break anything (except maybe tests relying on the old behavior), since the canonical path will be equivalent to non-canonical paths. # User-Facing Changes A user may get a path with symlinks resolved and `..`s replaced where they previously didn't. I'm not sure where this would happen, though, and anyway, the canonical path is probably the "correct" thing to present to the user. We're using `omnipath` to make the path presentable to the user on Windows, so there's no danger of someone getting an path with `\\?` there. # Tests + Formatting The tests for config files have been updated to run the binary using the `Director` so that it has access to the `XDG_CONFIG_HOME`/`HOME` environment variables to be able to change the config directory. |
||
---|---|---|
.. | ||
commands | ||
completions | ||
menus | ||
config_files.rs | ||
eval_cmds.rs | ||
eval_file.rs | ||
lib.rs | ||
nu_highlight.rs | ||
print.rs | ||
prompt.rs | ||
prompt_update.rs | ||
reedline_config.rs | ||
repl.rs | ||
syntax_highlight.rs | ||
util.rs | ||
validation.rs |