瀏覽代碼

have .app.src take precedence over .app file

pull/470/head
Tristan Sloughter 10 年之前
父節點
當前提交
be79d41093
共有 1 個檔案被更改,包括 15 行新增7 行删除
  1. +15
    -7
      src/rebar_app_info.erl

+ 15
- 7
src/rebar_app_info.erl 查看文件

@ -41,6 +41,8 @@
valid/1,
valid/2]).
-include("rebar.hrl").
-export_type([t/0]).
-record(app_info_t, {name :: binary(),
@ -161,13 +163,19 @@ app_file(AppInfo=#app_info_t{}, AppFile) ->
-spec app_details(t()) -> list().
app_details(AppInfo=#app_info_t{app_details=[]}) ->
AppFile = case app_file(AppInfo) of
undefined ->
app_file_src(AppInfo);
File ->
File
end,
rebar_file_utils:try_consult(AppFile);
case app_file(AppInfo) of
undefined ->
rebar_file_utils:try_consult(app_file_src(AppInfo));
AppFile ->
try
rebar_file_utils:try_consult(AppFile)
catch
throw:{error, {Module, Reason}} ->
?DEBUG("Warning, falling back to .app.src because of: ~s",
[Module:format_error(Reason)]),
rebar_file_utils:try_consult(app_file_src(AppInfo))
end
end;
app_details(#app_info_t{app_details=AppDetails}) ->
AppDetails.

Loading…
取消
儲存