Skip to content

Commit

Permalink
Un-break the interface (add back a removed function)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ferraz-oliveira committed Aug 2, 2023
1 parent 56802f3 commit 0a9a43b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/rebar/src/rebar_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
escape_chars/1,
escape_double_quotes/1,
escape_double_quotes_weak/1,
check_min_otp_version/1,
check_min_otp_version/2,
check_blacklisted_otp_versions/1,
info_useless/2,
Expand Down Expand Up @@ -411,6 +412,11 @@ line_count(PatchLines) ->
Tokenized = rebar_string:lexemes(PatchLines, "\n"),
{ok, length(Tokenized)}.

check_min_otp_version(undefined) ->
check_min_otp_version(undefined, undefined);
check_min_otp_version(MinOtpVersion) ->
check_min_otp_version(MinOtpVersion, undefined).

check_min_otp_version(undefined, _App) ->
ok;
check_min_otp_version(MinOtpVersion, App) ->
Expand All @@ -423,6 +429,9 @@ check_min_otp_version(MinOtpVersion, App) ->
true ->
?DEBUG("~ts satisfies the requirement for minimum OTP version ~ts",
[OtpRelease, MinOtpVersion]);
false when App =:= undefined ->
?ABORT("OTP release ~ts or later is required. Version in use: ~ts",
[MinOtpVersion, OtpRelease]);
false ->
?ABORT("OTP release ~ts or later is required by ~ts. Version in use: ~ts",
[MinOtpVersion, App, OtpRelease])
Expand Down

0 comments on commit 0a9a43b

Please sign in to comment.