marcosnils / bin

Effortless binary manager
MIT License
640 stars 44 forks source link

Filter logic not working properly for helix #181

Open Susensio opened 7 months ago

Susensio commented 7 months ago

I'm trying to install helix from https://github.com/helix-editor/helix/releases but I get no proper matches, I think it could be due to being compressed in tar.xz

bin install github.com/helix-editor/helix
   • Getting latest release for helix-editor/helix

Multiple matches found, please select one:

 [1] helix-23.10-x86_64.AppImage
 [2] helix-23.10-x86_64.AppImage.zsync
 Select an option: 
marcosnils commented 7 months ago

hey there! bin supports xz. Seems like what's happening here is that our filtering logic is not picking up the correct files for some reason. If you run bin install -a https://github.com/helix-editor/helix, you should be able to manually pick the release.

Do you mind editing the title of the issue so we can work on a fix? :pray:

Susensio commented 7 months ago

Done. How can I help? Can you reproduce the bug?

Susensio commented 7 months ago

Output with debug enabled

   • debug logs enabled, version: 0.17.2
commit: f7265c40a7b245a698a7eee603234ece8e1c7c86
built at: 2023-10-03T08:53:00Z
built by: goreleaser

   • Config directory is: /home/susensio/.config/bin
   • Download path set to /home/susensio/.local/bin
   • Getting latest release for helix-editor/helix
   • Keeping helix-23.10-x86_64.AppImage.zsync (URL https://api.github.com/repos/helix-editor/helix/releases/assets/132321490) with highest score 26
   • Keeping helix-23.10-x86_64.AppImage (URL https://api.github.com/repos/helix-editor/helix/releases/assets/132321501) with highest score 26
   • Removing helix-23.10-x86_64-windows.zip (URL https://api.github.com/repos/helix-editor/helix/releases/assets/132321505) with score 11 lower than 26
   • Removing helix-23.10-x86_64-macos.tar.xz (URL https://api.github.com/repos/helix-editor/helix/releases/assets/132321509) with score 11 lower than 26
   • Removing helix-23.10-x86_64-linux.tar.xz (URL https://api.github.com/repos/helix-editor/helix/releases/assets/132321515) with score 21 lower than 26
   • Removing helix-23.10-source.tar.xz (URL https://api.github.com/repos/helix-editor/helix/releases/assets/132321525) with score 1 lower than 26
   • Removing helix-23.10-aarch64-macos.tar.xz (URL https://api.github.com/repos/helix-editor/helix/releases/assets/132321530) with score 6 lower than 26
   • Removing helix-23.10-aarch64-linux.tar.xz (URL https://api.github.com/repos/helix-editor/helix/releases/assets/132321531) with score 16 lower than 26

Multiple matches found, please select one:

 [1] helix-23.10-x86_64.AppImage
 [2] helix-23.10-x86_64.AppImage.zsync
 Select an option:

My machine specs:

OS: Debian GNU/Linux trixie/sid x86_64
Kernel: 6.5.0-4-amd64
Packages: 3347 (dpkg), 7 (flatpak), 1 (cargo), 5 (snap)
Shell: fish 3.6.1
DE: GNOME 44.5 (wayland)
WM: Mutter
WM Theme: Adwaita
Terminal: tmux
marcosnils commented 7 months ago

Done. How can I help? Can you reproduce the bug?

yes, I can reproduce the bug. As commented above, if you do bin install -a https://github.com/helix-editor/helix bin will allow you the select the corresponding xz file.

Susensio commented 7 months ago

Done. How can I help? Can you reproduce the bug?

yes, I can reproduce the bug. As commented above, if you do bin install -a https://github.com/helix-editor/helix bin will allow you the select the corresponding xz file.

Yes I did it and it worked perfectly. Thank you.

I have a question about bin internals. Is this info about what resource is being selected stored somewhere? That is, in a future bin update, does it remember what selection I made and what binary to use?

marcosnils commented 7 months ago

I have a question about bin internals. Is this info about what resource is being selected stored somewhere? That is, in a future bin update, does it remember what selection I made and what binary to use?

yes, if you run bin --debug at the very top you'll see here the config directory is placed.