asdf-hashicorp icon indicating copy to clipboard operation
asdf-hashicorp copied to clipboard

`asdf install vagrant <version>` Fails

Open scottschreckengaust opened this issue 4 years ago • 6 comments

❯ asdf --version
v0.8.0
❯ asdf plugin list --urls --refs | grep vagrant
vagrant                      https://github.com/Banno/asdf-hashicorp.git master 4bd2904
❯ asdf list vagrant
  No versions installed
❯ asdf list all vagrant
1.4.0
...
2.2.10
❯ asdf install vagrant latest
Downloading vagrant version 2.2.10 from https://releases.hashicorp.com/vagrant/2.2.10/vagrant_2.2.10_darwin_amd64.zip
Error: vagrant version 2.2.10 not found
❯ asdf install vagrant 2.2.10
Downloading vagrant version 2.2.10 from https://releases.hashicorp.com/vagrant/2.2.10/vagrant_2.2.10_darwin_amd64.zip
Error: vagrant version 2.2.10 not found
❯ asdf install vagrant 1.4.0
Downloading vagrant version 1.4.0 from https://releases.hashicorp.com/vagrant/1.4.0/vagrant_1.4.0_darwin_amd64.zip
Error: vagrant version 1.4.0 not found

At https://www.vagrantup.com/downloads.html, I noticed that the MacOS download points to x86_64.dmg instead of darwin_amd64.zip at https://releases.hashicorp.com/vagrant/2.2.10/vagrant_2.2.10_x86_64.dmg, could this be the issue?

scottschreckengaust avatar Oct 01 '20 21:10 scottschreckengaust

FYI: packer and terraform work (didn't try any others)

scottschreckengaust avatar Oct 01 '20 21:10 scottschreckengaust

I have the same problem. Looking at https://releases.hashicorp.com/vagrant/2.2.10/ it looks like they don't have any zip builds for macOS, I guess they stopped providing them for some reason? I have no idea how one would solve this without building Vagrant from source using Ruby.

denizdogan avatar Oct 09 '20 14:10 denizdogan

derive a different location based on system architecture...

https://github.com/Banno/asdf-hashicorp/blob/master/bin/install#L50-L54

scottschreckengaust avatar Oct 14 '20 22:10 scottschreckengaust

Would it be possible to know the status for this issue? It's been a while since it's open 😏

x80486 avatar Apr 09 '21 19:04 x80486

This might take a little bit of strange logic since it looks like vagrant uses different release names than the other common tools this supports, but I can take a look.

DustinChaloupka avatar Apr 09 '21 22:04 DustinChaloupka

The releases made for vagrant are quite a bit different from the other packages that this plugin supports. The linux .zip file does exist for newer releases, but that's the only one. We do not have any plans to add actual support for installing vagrant currently. This plugin is getting moved to the asdf-community, so maybe someone will be willing to add support. @radditude might also have some ideas on getting releases to be the same as other Hashicorp tools?

DustinChaloupka avatar Apr 12 '21 14:04 DustinChaloupka

Sharing my comment here also:

asdf plugins are intended to support 1 tool and any number of binaries installed by said tool. The association is plugin:tool:binaries=1:1:*. This is because the asdf plugin lifecycle hooks are supposed to allow modifications to the usage of specific binaries installed by the plugin.

Maintenance becomes a burden which spawns plugins like this. For the most part they work, but prefer more specific plugins where available.

jthegedus avatar Apr 16 '21 03:04 jthegedus