Fix error message about unsupported versions

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
This commit is contained in:
Jeremie Dimino 2018-06-29 23:23:38 +01:00 committed by Rudi Grinberg
parent 3d65c4e378
commit 757400a6a6
1 changed files with 6 additions and 3 deletions

View File

@ -74,9 +74,12 @@ let check_supported t (loc, ver) =
(String.concat ~sep:"\n"
(List.map (Supported_versions.supported_ranges t.supported_versions)
~f:(fun (a, b) ->
sprintf "- %s to %s"
(Version.to_string a)
(Version.to_string b))))
if a = b then
sprintf "- %s" (Version.to_string a)
else
sprintf "- %s to %s"
(Version.to_string a)
(Version.to_string b))))
let greatest_supported_version t =
Supported_versions.greatest_supported_version t.supported_versions