Skip to content
This repository
Browse code

Fix for OTP releases that have weird version infos

  • Loading branch information...
commit 51d8ee8a0970c948ae4079fbf5b5cf77dbc29acc 1 parent 91dce2b
Kostis Sagonas kostis authored

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. +4 1 write_compile_flags
5 write_compile_flags
@@ -44,6 +44,9 @@ main([OutFile]) ->
44 44 ok = file:close(Handle),
45 45 ok.
46 46
  47 +%% the stupid try-catch construct below is due to e.g. the R15A
  48 +%% release being denoted as having "5.9.pre" as version info :-(
47 49 -spec parse_version_string(string()) -> [non_neg_integer()].
48 50 parse_version_string(VerStr) ->
49   - [list_to_integer(S) || S <- string:tokens(VerStr, ".")].
  51 + [try list_to_integer(S)
  52 + catch _:_ -> 0 end || S <- string:tokens(VerStr, ".")].

0 comments on commit 51d8ee8

Please sign in to comment.
Something went wrong with that request. Please try again.