浏览代码

Stop clean from erroring if there's no .app file

If rebar tries to clean the .app file (because there's a .app.src file)
and it doesn't exist (possibly because of a bad compile), don't fail.
pull/3/head
Andrew Thompson 14 年前
父节点
当前提交
5158f9531d
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. +9
    -1
      src/rebar_otp_app.erl

+ 9
- 1
src/rebar_otp_app.erl 查看文件

@ -68,7 +68,15 @@ clean(_Config, File) ->
%% If the app file is a .app.src, delete the generated .app file
case rebar_app_utils:is_app_src(File) of
true ->
file:delete(rebar_app_utils:app_src_to_app(File));
case file:delete(rebar_app_utils:app_src_to_app(File)) of
ok ->
ok;
{error, enoent} ->
%% The file not existing is OK, we can ignore the error.
ok;
Other ->
Other
end;
false ->
ok
end.

正在加载...
取消
保存