eget icon indicating copy to clipboard operation
eget copied to clipboard

Examples stopped working – please add regex for asset filter

Open blurayne opened this issue 11 months ago • 1 comments

If you put the example on README.md into a eget.toml it is unable to automatically install:

2 candidates found for asset chain: please select manually
(1) micro-2.0.14-linux64-static.tar.gz
(2) micro-2.0.14-linux64-static.tar.gz.sha
Enter selection number: Error reading selection
one or more errors occurred while downloading: [exit status 1]

Suggested solution

  1. Either add something like dissallow_extensions=["sha"] for global and tool seections and let it default to ["sum","sha","md5","sha1"] etc.

  2. Or allow regex in asset_filters.

If you don't want a breaking change introduce something like use_regex=true in global and tool sections

  1. Maybe both of them.

blurayne avatar Jan 21 '25 10:01 blurayne

Hi @blurayne, I was having the same problem but then I saw in the help of the command line that you can use ^ syntax for an anti-match.

For example for micro you can have the following in your ~/.eget.toml and it'll work:

["zyedidia/micro"]
asset_filters = [".tar.gz", "^.sha"]

jh12z avatar Jul 31 '25 21:07 jh12z