Skip to content

Commit

Permalink
fix: more compatability craziness
Browse files Browse the repository at this point in the history
starts_with requires 4.13

Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Jan 19, 2025
1 parent e7e3046 commit d8ea64c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vendor/opam/src/format/opamPackage.ml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ module Version = struct
match String.split_on_char '.' (List.nth parts 0) with
| [] -> None
| major :: rest ->
let style, major =
if String.starts_with major ~prefix:"v"
let style, major =
if String.length major > 0 && major.[0] = 'v'
then V_triple, String.sub major 1 (String.length major - 1)
else Triple, major
in
Expand Down

0 comments on commit d8ea64c

Please sign in to comment.