From a56409739425a08c23f47b0a03219b9cad9d39c4 Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" Date: Wed, 2 Aug 2023 21:41:27 +0100 Subject: [PATCH] Protect against undefined information --- apps/rebar/src/rebar3.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/rebar/src/rebar3.erl b/apps/rebar/src/rebar3.erl index cefe117a0..e3624e765 100644 --- a/apps/rebar/src/rebar3.erl +++ b/apps/rebar/src/rebar3.erl @@ -135,7 +135,11 @@ run_aux(State, RawArgs) -> end, MinimumOTPVsn = rebar_state:get(State1, minimum_otp_vsn, undefined), - App = rebar_state:current_app(State1), + App0 = rebar_state:current_app(State1), + App = case App0 of + undefined -> undefined; + _ -> rebar_app_info:name(App0) + end, rebar_utils:check_min_otp_version(MinimumOTPVsn, App), rebar_utils:check_blacklisted_otp_versions(rebar_state:get(State1, blacklisted_otp_vsns, undefined)),