import: nuget: Fix bug in version spec parsing.

* guix/import/nuget.scm (parse-nuget-range->primitives): Modify.

Change-Id: I38d45596f22aee9075aa60d714240aee0de4a24e
This commit is contained in:
Danny Milosavljevic 2026-01-09 23:59:28 +01:00
parent 811ee1ab9f
commit 71e1787a35
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -144,7 +144,7 @@ primitives suitable for the 'semver-range' constructor."
'<)))
(and=> (string->semver/safe max-ver-str)
(cute list op <>)))))))
(let ((m-exact (string-match "^\\[([0-9][^\\]]*)\\]$" str)))
(let ((m-exact (string-match "^\\[([0-9][^]]*)\\]$" str)))
(if m-exact
(let ((slice (string->partial-semver (match:substring m-exact 1))))
(if slice (list `((= ,slice))) '()))