From a529577b740d5a0a8f48703d4d66248099155de0 Mon Sep 17 00:00:00 2001 From: Joseph Wayne Norton Date: Mon, 27 Dec 2010 11:04:47 +0900 Subject: Remove erlc target after fail_on_warning failure Prevent overlooking a compilation warning by removing the target beam file after fail_on_warning failure. --- src/rebar_erlc_compiler.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index e69dea9..13c2eaa 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -228,6 +228,8 @@ internal_erl_compile(Source, Config, Outdir, ErlOpts) -> %% We got at least one warning -- if fail_on_warning is in options, fail case lists:member(fail_on_warning, Opts) of true -> + %% remove target to prevent overlooking this failure + ok = file:delete(Target), ?FAIL; false -> ok -- cgit v1.1