/vendor/autoload is not added as last path on Windows #14872
Closed
Description
Describe the bug
The docs state that ($nu.data-dir)/vendor/autoload
is added as the last path in nu.vendor-autoload-dirs
.
I am using XDG env variables on Windows and have found this is not the case
How to reproduce
On Windows
- Have
$env.XDG_DATA_HOME="~/.local/share
- Check value of $nu.data-dir
~> $nu.data-dir
C:\Users\jhenry\.local\share\nushell
- Check value of
$nu.vendor-autoload-dirs
~> $nu.vendor-autoload-dirs
╭───┬─────────────────────────────────────────────────────────╮
│ 0 │ C:\ProgramData\nushell\vendor\autoload │
│ 1 │ C:\Users\jhenry\AppData\Roaming\nushell\vendor\autoload │
╰───┴─────────────────────────────────────────────────────────╯
- As a result, instructions on starship.rs do not work on Windows
mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
Expected behavior
I expect nu to correctly add $"($nu.data-dir)/vendor/autoload"
to $nu.vendor-autoload-dirs
Configuration
key | value |
---|---|
version | 0.101.0 |
major | 0 |
minor | 101 |
patch | 0 |
branch | |
commit_hash | fb26109 |
build_os | windows-x86_64 |
build_target | x86_64-pc-windows-msvc |
rust_version | rustc 1.81.0 (eeb90cda1 2024-09-04) |
rust_channel | 1.81.0-x86_64-pc-windows-msvc |
cargo_version | cargo 1.81.0 (2dbb1af80 2024-08-20) |
build_time | 2024-12-22 15:52:47 +00:00 |
build_rust_channel | release |
allocator | mimalloc |
features | default, sqlite, trash |
installed_plugins |