Skip to content

bug: when asdf install fails, running it again says tool is already installed #2053

@wmcnamee-coreweave

Description

@wmcnamee-coreweave

Describe the Bug

When asdf install <tool> <version> fails, I should be able to run asdf install <tool> <version> again, but it will say: version <version> of <tool> is already installed

Steps to Reproduce

asdf install python 10.0.0
python-build 10.0.0 /Users/<me>/.asdf/installs/python/10.0.0
python-build: definition not found: 10.0.0
error installing version: failed to run install callback: exit status 2

asdf install python 10.0.0
version 10.0.0 of python is already installed

Expected Behaviour

If an install fails, then it should not report that it's already installed, as that's not true. It requires me to run asdf uninstall <tool> <version> first.

This is most often an issue when there's a network failure, or for private tools, not being authenticated to github (as an example).

Actual Behaviour

running asdf install <tool> <version> a second time incorrectly reports that the tool is already installed.

Environment

asdf info
OS:
Darwin CW-D4JV9MFX9R-L 24.4.0 Darwin Kernel Version 24.4.0: Wed Mar 19 21:17:32 PDT 2025; root:xnu-11417.101.15~1/RELEASE_ARM64_T6030 arm64 arm Darwin

SHELL:
zsh 5.9 (arm64-apple-darwin24.0)

BASH VERSION:
5.2.37(1)-release

ASDF VERSION:
0.16.4

asdf plugins affected (if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions