From 93e300b7657d34111f11257e23aebb629ef21438 Mon Sep 17 00:00:00 2001 From: Tino Breddin Date: Fri, 22 Mar 2019 12:12:13 +0100 Subject: Handle incorret app info in escriptize --- src/rebar_prv_escriptize.erl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/rebar_prv_escriptize.erl b/src/rebar_prv_escriptize.erl index 9cb3fdd..d6d9414 100644 --- a/src/rebar_prv_escriptize.erl +++ b/src/rebar_prv_escriptize.erl @@ -80,11 +80,16 @@ do(State) -> ?PRV_ERROR({bad_name, Name}) end end, - AppInfo1 = rebar_hooks:run_all_hooks(Cwd, pre, ?PROVIDER, Providers, AppInfo0, State), - ?INFO("Building escript...", []), - Res = escriptize(State, AppInfo1), - rebar_hooks:run_all_hooks(Cwd, post, ?PROVIDER, Providers, AppInfo1, State), - Res. + case AppInfo0 of + {error, _} = Err -> + Err; + _ -> + AppInfo1 = rebar_hooks:run_all_hooks(Cwd, pre, ?PROVIDER, Providers, AppInfo0, State), + ?INFO("Building escript...", []), + Res = escriptize(State, AppInfo1), + rebar_hooks:run_all_hooks(Cwd, post, ?PROVIDER, Providers, AppInfo1, State), + Res + end. escriptize(State0, App) -> AppName = rebar_app_info:name(App), -- cgit v1.1