summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2018-10-10 11:53:27 -0600
committerGitHub <noreply@github.com>2018-10-10 11:53:27 -0600
commit1df574a6f55506d606020d64f42c33f8bbf16a7b (patch)
tree64687b5fb39cf827d28fa270869b12be9a641504 /src
parent5717810c24b3f37158e81fad80ae4d9e5d450c70 (diff)
throw builder error when returned from project build (#1909)
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_compile.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rebar_prv_compile.erl b/src/rebar_prv_compile.erl
index 54bdee2..a509704 100644
--- a/src/rebar_prv_compile.erl
+++ b/src/rebar_prv_compile.erl
@@ -208,8 +208,12 @@ build_app(AppInfo, State) ->
%% load plugins since thats where project builders would be
PluginDepsPaths = rebar_state:code_paths(State, all_plugin_deps),
code:add_pathsa(PluginDepsPaths),
- Module:build(AppInfo),
- rebar_utils:remove_from_code_path(PluginDepsPaths);
+ case Module:build(AppInfo) of
+ ok ->
+ rebar_utils:remove_from_code_path(PluginDepsPaths);
+ {error, Reason} ->
+ throw({error, {Module, Reason}})
+ end;
_ ->
throw(?PRV_ERROR({unknown_project_type, rebar_app_info:name(AppInfo), Type}))
end