nanovms / ops

ops - build and run nanos unikernels
https://ops.city
MIT License
1.27k stars 132 forks source link

Fix local package regexp for packages with hyphen in name #1596

Closed radiosilence closed 6 months ago

radiosilence commented 6 months ago

Currently there is a bug where because the regexp is liberal enough to allow either _ or - to delimit the break between name and version, a package with dash will fail.

So for instance, a package like

my-package_1.2.3

Will have a name of "my" and a version of "package_1.2.3".

Not wanting to change this behaviour by simply changing the regex to only accept _ as a delimeter, I have changed the regex to split at the last match.

Fixes: https://github.com/nanovms/ops/issues/1594