jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
8.03k stars 210 forks source link

mise install terraform requires asdf binary #2296

Open jhogendorn opened 2 weeks ago

jhogendorn commented 2 weeks ago

Describe the bug When installing terraform using mise, the plugin requires the existence of the asdf binary for some part of its operation.

To Reproduce

Expected behavior It should run without the asdf binary existing

Additional context Its not really a mise bug as such, its the asdf plugin expecting the asdf binary to exist for some part of its script to execute. Not sure if mise should shim asdf somehow to support or whether an issue/mr needs to happen upstream.

roele commented 2 weeks ago

Can you provide some more information like the output of mise doctor. I am unable to see an issue installing terraform on my environment.

❯ mise install terraform
mise plugin:terraform ✓ https://github.com/asdf-community/asdf-hashicorp.git#f1602b6
mise terraform@1.8.5 ✓ installed
❯ mise shell terraform@1.8.5
❯ terraform --version
Terraform v1.8.5
on darwin_arm64

If you should use other binaries than terraform you should ensure you install the plugins as described as there is only one repository handling all binaries relying on the plugin folder name to determine the binary name.

mise plugin install consul https://github.com/asdf-community/asdf-hashicorp.git
...
mise plugin install vault https://github.com/asdf-community/asdf-hashicorp.git
jdx commented 2 weeks ago

it's possible "fake-asdf" is not being setup correctly anymore on new setups since I think I saw mention from someone else about a similar thing, it might work for you @roele since you already have it setup

roele commented 2 weeks ago

Did not realize that this is not setup anymore nowadays.

As a workaround i assume this can be done manually.

echo '#!/bin/sh
mise asdf "$@"
' >> ~/.local/share/mise/.fake-asdf/asdf

According to the code this gets setup as part of the shims and a mise reshim should create the necessary script.

jdx commented 2 weeks ago

well it should be still working, but given this ticket and another message I saw I think it's possible something may have broke but I haven't verified