asdf-community / asdf-crystal

Crystal plugin for the asdf version manager
https://github.com/asdf-vm/asdf
Apache License 2.0
75 stars 16 forks source link

Unknown or unavailable versions may erroneously "succeed" when attempting to install #31

Closed cbortz closed 4 years ago

cbortz commented 4 years ago

Hey y'all. Quick background: I'm using macOS with ohmyzsh. I was messing around with the plugin today and I tried to install a version that I knew wouldn't be available to see what would happen. I was surprised to see that asdf reported that the version was successfully installed even though the output suggested otherwise:

> $ asdf install crystal 0.42.0
∗ Downloading and installing Crystal...
tar: Error opening archive: Unrecognized archive format
The installation was successful!

I can also see the version when listing installations:

> $ asdf list crystal
  0.30.0
  0.31.0
  0.32.0
  0.33.0
  0.34.0
  0.42.0

I've verified that removing this failed installation is as simple as using asdf uninstall. Although possibly trivial, I don't think this behavior is expected. I am going to open a pull request addressing there here in a few minutes.