Remove erlc target after fail_on_warning failure

Prevent overlooking a compilation warning by removing the target beam
file after fail_on_warning failure.
This commit is contained in:
Joseph Wayne Norton 2010-12-27 11:04:47 +09:00 committed by Tuncer Ayaz
parent 008dcb8542
commit a529577b74

View file

@ -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