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

select asset finds two candidates #10

Closed
thorstenkampe opened this issue Nov 8, 2021 · 4 comments
Closed

select asset finds two candidates #10

thorstenkampe opened this issue Nov 8, 2021 · 4 comments

Comments

@thorstenkampe
Copy link

Projects often provide musl and standard (non-musl) packages. I would like to download the non-musl package but the asset string matches both (see below).

Is there a way to avoid prompting? Maybe by accepting a regular expression (like bat_.+amd64\.deb) for the matching string?

> eget --asset amd64.deb sharkdp/bat
2 candidates found for asset `amd64.deb`: please select manually
(1) bat-musl_0.18.3_amd64.deb
(2) bat_0.18.3_amd64.deb
@zyedidia
Copy link
Owner

zyedidia commented Nov 8, 2021

I see the issue, it seems like having a regex option could work (I have this implemented on the rgxasset branch). Another option could be to allow --asset to be specified multiple times, each time filtering a little more. For example you could use --asset amd64.deb --asset musl. Not sure which solution is better at the moment.

@thorstenkampe
Copy link
Author

--asset can already be specified multiple times - but it does the opposite. And it would not allow me to specify the "non-musl" version.

./eget --asset amd64.deb --asset musl sharkdp/bat
4 candidates found for asset `musl`: please select manually
(1) bat-musl_0.18.3_amd64.deb
(2) bat-musl_0.18.3_i686.deb
(3) bat-v0.18.3-i686-unknown-linux-musl.tar.gz
(4) bat-v0.18.3-x86_64-unknown-linux-musl.tar.gz
Enter selection number:

@zyedidia
Copy link
Owner

zyedidia commented Nov 8, 2021

I think in the current version it will just use the asset value most recently specified, so in this case it is just finding all musl matches.

@zyedidia
Copy link
Owner

zyedidia commented Nov 9, 2021

I have decided to go with filtering via multiple flags. The update has been merged, and --asset can now also be abbreviated to -a. I will make a new release later tonight.

@zyedidia zyedidia closed this as completed Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants