Describe the bug
Mise sets the version priority when using mise use in reverse order from what I think is expected.
For example...
mise use -g java@17 java@21 java@8 results in:
java = ["8", "21", "17"]
Which means that java8 ends up being the first prioritized one on $PATH / mise where
I'd expect this to result in the exact same ordering that I put when using mise use in the first place. Maybe this is intentional, though to me this unexpected (goes against the "principle of least surprise").
To Reproduce
Steps to reproduce the behavior.
mise use -g java@17 java@21 java@8 (or presumably any tool)
Confirm that the first tool on path is the same as the last argument to the mise use command
Confirm that the written mise.toml (global or local) ends up with an array with entries reverse of the args given to the cli.
Expected behavior
I'd expect the order of tool priority to reflect the same order of arguments in mise use
mise doctor output
version: 2024.5.27 macos-arm64 (2024-05-31)
activated: yes
shims_on_path: no
build_info:
Target: aarch64-apple-darwin
Features: DEFAULT, NATIVE_TLS
Built: Fri, 31 May 2024 02:31:10 +0000
Rust Version: rustc 1.78.0 (9b00956e5 2024-04-29) (Homebrew)
Profile: release
shell:
/bin/zsh
zsh 5.9 (x86_64-apple-darwin23.0)
# etc...
# Let me know if you need more specific output...
Describe the bug Mise sets the version priority when using
mise use
in reverse order from what I think is expected.For example...
mise use -g java@17 java@21 java@8
results in:java = ["8", "21", "17"]
java8
ends up being the first prioritized one on $PATH /mise where
I'd expect this to result in the exact same ordering that I put when using
mise use
in the first place. Maybe this is intentional, though to me this unexpected (goes against the "principle of least surprise").To Reproduce Steps to reproduce the behavior.
mise use -g java@17 java@21 java@8
(or presumably any tool)mise use
commandmise.toml
(global or local) ends up with an array with entries reverse of the args given to the cli.Expected behavior
I'd expect the order of tool priority to reflect the same order of arguments in
mise use
mise doctor
outputAdditional context N/A