marwanhawari / stew

🥘 An independent package manager for compiled binaries.
MIT License
193 stars 14 forks source link

Handle archives with .tgz extension #27

Closed hannah98 closed 7 months ago

hannah98 commented 8 months ago

I ran stew install tomnomnom/gron and stew assumed it was a binary as it prompted:

! Rename the binary? gron-linux-amd64-0.7.1.tgz

The resulting file in the destination was indeed still the tgz file.

I checked the archiver library stew is using and it looks like it supports tgz files: https://github.com/mholt/archiver/blob/43a073ede7796a604dc6f4b1acabcfb4725c43be/zip.go#L385

I don't know much about golang, but I think if this line was updated to include tgz it would fix the issue: https://github.com/marwanhawari/stew/blob/04299363c7ff5e196a95373881762bc27227bba9/lib/util.go#L19

marwanhawari commented 7 months ago

Great callout! I agree that this should be comprehensive. Thanks for opening a PR!

marwanhawari commented 7 months ago

Closed by https://github.com/marwanhawari/stew/pull/28