resolve script resolution strategy arguments not working
- Dominant language
- Shell
- Stars
- 989
- Forks
- 162
- PR merge metrics
- No merged PRs in 30d
Description
Hey, 👋
Hope you are doing well! This bug report is for the ASDF `nodejs` plugin command `resolve` no longer supporting the versioning strategies as arguments to the tool, as documented in the [README](https://github.com/asdf-vm/asdf-nodejs?tab=readme-ov-file#resolving-latest-available-lts-version-in-a-script).
```
❯ asdf cmd nodejs resolve lts --latest-installed
Incorrect Usage: flag provided but not defined: -latest-installed
❯ asdf cmd nodejs resolve lts --latest-available
Incorrect Usage: flag provided but not defined: -latest-available
```
After reviewing the [script itself](https://github.com/asdf-vm/asdf-nodejs/blob/master/lib/commands/command-resolve), it looks like these arguments do still exist, but it seems like Go's command-line argument/flag parser greedily parses the strategy's flags, leading to the incorrect usage error.
## Setup
```
❯ asdf info
OS:
Darwin gh0st.local 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:25 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6020 arm64
SHELL:
zsh 5.9 (arm-apple-darwin22.1.0)
BASH VERSION:
5.2.37(1)-release
ASDF VERSION: (installation via homebrew)
0.18.0 (revision unknown)
ASDF INTERNAL VARIABLES:
ASDF_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/kkirsche/.asdf
ASDF_CONFIG_FILE=/Users/kkirsche/.asdfrc
ASDF INSTALLED PLUGINS:
nodejs https://github.com/asdf-vm/asdf-nodejs.git
fd2c7f94c4c71416047cacf2af6e4fa819b364b7
python https://github.com/danhper/asdf-python.git
d4caa7d4832313b4c141ee0ceca4118747147e89
ruby https://github.com/asdf-vm/asdf-ruby.git
08c0c7ac545ea01e737ec130a54269d230a769f3
rust https://github.com/code-lever/asdf-rust.git
95acf4fe65df1de74fca502482b8f3ac5af73c05
```
## May relate to
- #369
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.