Closed
Description
Describe the Bug
- Some messages are printed to stderr where streaming them to stdout would be more appropriate.
- Additionally, non-zero exit codes are produced in cases where no failure seem to be present.
Steps to Reproduce
Examples:
- Updating plugins
There seems to be no error, the exit code is 0, yet, the output is sent to stderr, which would indicate that something has gone wrong, even though the contents of the message suggest success.
$ asdf plugin update scarb > /dev/null updated scarb to ref refs/heads/main
Emitted here:Line 1058 in 74d7b17
- Listing installed versions for plugin that has no versions installed
This is unexpected, as normally tools just produce empty list in such context and exit successfully, e.g.
$ asdf list scarb > /dev/null No compatible versions installed (scarb ) echo $? 1
Normally,$ mkdir empty $ ls empty > /dev/null $ echo $? 0
grep
would be used to parse output and exit with error if necessary.
Expected Behaviour
- Exit code: 0, empty stderr
- Exit code: 0, empty stderr
Actual Behaviour
- Exit code: 0, non-empty stderr
- Exit code: 1, non-empty stderr
Environment
asdf info
OS:
Darwin MacBook-Pro.local 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:24 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6030 arm64
SHELL:
zsh 5.9 (arm64-apple-darwin24.0)
BASH VERSION:
5.2.37(1)-release
ASDF VERSION:
0.16.6
ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/delevo/.asdf
ASDF_CONFIG_FILE=/Users/delevo/.asdfrc
asdf plugins affected (if relevant)
No response