devops-works / binenv

One binary to rule them all. Manage all those pesky binaries (kubectl, helm, terraform, ...) easily.
MIT License
373 stars 44 forks source link

Installation of tool 'naabu' is not working in the lastest version #98

Open angrox opened 3 years ago

angrox commented 3 years ago

The installation of naabu fails in the latest version 2.0.3:

binenv install naabu 2021-04-27T06:44:38Z WRN version for "naabu" not specified; using "2.0.3" 2021-04-27T06:44:38Z ERR unable to install "naabu" (2.0.3) error="unable to download binary at https://github.com/projectdiscovery/naabu/releases/download/v2.0.3/naabu_2.0.3_linux_amd64.tar.gz: 404 Not Found"

Reason: Project switched the filename deliminator from underscore to dash

Normally I would just fix it and open a PR but this only affects the latest version so changing it would break all older versions.

Any ideas of how to fix it?

leucos commented 3 years ago

Thanks for the report @angrox . Interesting use case.

Well, for now we do not have many solutions:

  1. break backward compatibility
  2. add another entry in the distributions file (with a different name, e.g. nabu2)

Could be interesting in the future to have multiple URLs for fetch releases.

angrox commented 3 years ago

I also thought of multiple URLs to check against but was unsure if such a PR would be accepted.

I am not happy with breaking backward compatibility neither with a second entry for the same tool. :-/

leucos commented 3 years ago

I think this is a good idea. May be we can use :

fetch:
      urls:

so we preserve backward compatibility.

We'll keep fetch.url for a while until we bump major version.

What do you think ?

xx4h commented 5 months ago

I worked on this, see #252