marcosnils / bin

Effortless binary manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regex matching for package_path

mbainter opened this issue · comments

(Feature Request)
A number of packages use the version number within the package, either as part of the initial directory or in the binary itself (which has come up before in #135).

it would be a nice addition to be able to use a regex for the package path, even if you had to edit the JSON by hand for the time being. As an initial implementation, it could simply require it only to match one file, and if it matches more than one error out.

This would help deal with these edge-cases in the short term.

@mbainter I was thinking in a feature without having to actually make the user set a regex matching. Do you have an example of a package that's currently triggering this for you?

I thought you were, but - that is definitely a more complex solution to undertake, with a large potential for irritating edge cases. If nothing else, an mvp like this might help to establish what such a solution would need to look like. You could potentially even automate that, with a submission subcommand of some kind to send example packages and the regex people are using to some endpoint to see how big a task that will be.

In my case, I think I'm mostly hitting it in orhun/systeroid and orhun/systeroid-tui which has a tarball structured as <package>-<version>/<binary> (i.e. systeroid-0.3.1/systeroid)