Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.8.0 architecture has changed #2

Open
waddles opened this issue Jul 4, 2024 · 2 comments
Open

v0.8.0 architecture has changed #2

waddles opened this issue Jul 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@waddles
Copy link

waddles commented Jul 4, 2024

Describe the bug

As of v0.8.0 the packages are now built using amd64 instead of x86_64.

Steps to reproduce

$ mise install k2tf@latest
mise ⚠️ k2tf is a community-developed plugin – https://github.com/carlduevel/asdf-k2tf
Would you like to install k2tf? Yes
curl: (22) The requested URL returned error: 404
mise ~/.local/share/mise/plugins/k2tf/bin/download failed
* Downloading k2tf release 0.8.0...
curl: (22) The requested URL returned error: 404
asdf-k2tf: Could not download https://github.com/sl1pm4t/k2tf/releases/download/v0.8.0/k2tf_0.8.0_Darwin_x86_64.tar.gz
mise ~/.local/share/mise/plugins/k2tf/bin/download exited with non-zero status: exit code 1
mise Run with --verbose or MISE_VERBOSE=1 for more information

Expected behavior

❯ ARCH=amd64 mise use -g k2tf@latest
mise [email protected]            ✓ installed                                                                                                                                                                          mise ~/.config/mise/config.toml tools: [email protected]

Screenshots

Additional context

@waddles waddles added the bug Something isn't working label Jul 4, 2024
@waddles
Copy link
Author

waddles commented Jul 4, 2024

I managed a workaround with this

diff --git a/lib/utils.bash b/lib/utils.bash
index d7b7cef..2665a55 100644
--- a/lib/utils.bash
+++ b/lib/utils.bash
@@ -36,7 +36,7 @@ download_release() {
   local version filename url
   version="$1"
   filename="$2"
-  url="$GH_REPO/releases/download/v${version}/k2tf_${version}_$(uname)_x86_64.tar.gz"
+  url="$GH_REPO/releases/download/v${version}/k2tf_${version}_$(uname)_${ARCH:-$(uname -m)}.tar.gz"
   echo "* Downloading $TOOL_NAME release $version..."
   curl "${curl_opts[@]}" -o "$filename" -C - "$url" || fail "Could not download $url"
 }

but it's a bit hacky because

  1. you shouldn't need to specify the ARCH when calling mise/asdf
  2. uname -m on intel mac still returns x86_64 - it should probably do a substitution in code instead of making the user specify it.

@carlduevel
Copy link
Owner

Hi @waddles,
thanks for the bug report.
Tests have been failing for a while now, but I did not take the time to fix this.
It is fixed now by #3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants