diff options
author | Joseph Wayne Norton <norton@alum.mit.edu> | 2010-12-27 11:04:47 +0900 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2010-12-27 13:29:53 +0100 |
commit | a529577b740d5a0a8f48703d4d66248099155de0 (patch) | |
tree | 2c0369423967dcd740de99b0260f5a57f4878157 | |
parent | 008dcb8542ed4bb1aed98e3fed92c55b0770d132 (diff) |
Remove erlc target after fail_on_warning failure
Prevent overlooking a compilation warning by removing the target beam
file after fail_on_warning failure.
-rw-r--r-- | src/rebar_erlc_compiler.erl | 2 |
1 files changed, 2 insertions, 0 deletions
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 |