diff options
author | Tino Breddin <t@tolbrino.com> | 2019-03-22 12:12:13 +0100 |
---|---|---|
committer | Tino Breddin <t@tolbrino.com> | 2019-03-22 12:12:13 +0100 |
commit | 93e300b7657d34111f11257e23aebb629ef21438 (patch) | |
tree | cf229b5a63a6b5625ba79d3658e8694a1adbec41 | |
parent | 9c28e9122ddc5500e5ce70da6aa06d59dd8a2563 (diff) |
Handle incorret app info in escriptize
-rw-r--r-- | src/rebar_prv_escriptize.erl | 15 |
1 files changed, 10 insertions, 5 deletions
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), |