Skip to content

Commit 0ac654f

Browse files
committed
fix(checker): Handle many-to-one condition for version string
1 parent a04020d commit 0ac654f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lisp/_prepare.el

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,9 +1130,14 @@ Standard is, 0 (error), 1 (warning), 2 (info), 3 (log), 4 or above (debug)."
11301130
(eask--check-strings
11311131
"Unmatched package name '%s'; it should be '%s'"
11321132
(eask-package-name) (package-desc-name eask-package-desc))
1133-
(eask--check-strings
1134-
"Unmatched version '%s'; it should be '%s'"
1135-
(eask-package-version) (package-version-join (package-desc-version eask-package-desc)))
1133+
(when-let* ((ver-eask (eask-package-version))
1134+
(ver-pkg (package-desc-version eask-package-desc))
1135+
;; `package-version-join' returns only one of the possible
1136+
;; inverses, since `version-to-list' is a many-to-one operation
1137+
((not (equal (version-to-list ver-eask) ver-pkg))))
1138+
(eask--check-strings
1139+
"Unmatched version '%s'; it should be '%s'"
1140+
ver-eask (package-version-join ver-pkg)))
11361141
(eask--check-strings
11371142
"Unmatched summary '%s'; it should be '%s'"
11381143
(eask-package-description) (package-desc-summary eask-package-desc))

0 commit comments

Comments
 (0)