diff options
-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 |