`asdf install` should exit with exit code of 0 when a tool version is set to uninstallable system version
- Dominant language
- Go
- Stars
- 25.6k
- Forks
- 941
- Avg merge
- 9h 24m
- Merged PRs (30d)
- 3
Description
> `asdf install` still returns a non-zero exit code with `postgres system` in my `~/.tool-versions`. I'd think it should only exit with a non-zero exit code when trying to install a `system` version directly, e.g.: `asdf install postgres system` as in this test case:
>
> https://github.com/asdf-vm/asdf/blob/5646b389f73b31fcb5b10711a0ee06bea4fc6141/test/install_command.bats#L220-L225
>
> I think `asdf install` should skip over them and return success.
>
> Currently:
>
> ```
> ➜ asdf install
> [...]
> skipping uninstallable version system of postgres
> version [...] of ruby is already installed
> [...]
>
> ➜ echo $?
> 1
>
> ➜ asdf install postgres system
> error installing version: uninstallable version system of postgres
>
> ➜ echo $?
> 1
> ```
_Originally posted by @ZimbiX in [#1930](https://github.com/asdf-vm/asdf/issues/1930#issuecomment-3707069538)_
Contributor guide
Research direction
Start with test/install_command.bats at the linked lines, comparing bulk `asdf install` with `asdf install postgres system`. Trace the install entry point for how skipped `system` versions affect the final status. Done means bulk installation returns 0 while directly installing `system` still returns 1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100