瀏覽代碼

Make missing file report more comprehensive

pull/2110/head
Serge Aleynikov 5 年之前
父節點
當前提交
d518809351
共有 1 個文件被更改,包括 9 次插入5 次删除
  1. +9
    -5
      src/rebar_compiler_erl.erl

+ 9
- 5
src/rebar_compiler_erl.erl 查看文件

@ -74,11 +74,15 @@ needed_files(Graph, FoundFiles, _, AppInfo) ->
{OtherErls, ErlOpts ++ AdditionalOpts}}.
dependencies(Source, SourceDir, Dirs) ->
{ok, Fd} = file:open(Source, [read]),
Incls = parse_attrs(Fd, [], SourceDir),
AbsIncls = expand_file_names(Incls, Dirs),
ok = file:close(Fd),
AbsIncls.
case file:open(Source, [read]) of
{ok, Fd} ->
Incls = parse_attrs(Fd, [], SourceDir),
AbsIncls = expand_file_names(Incls, Dirs),
ok = file:close(Fd),
AbsIncls;
{error, Reason} ->
throw({cannot_read_file, Source, file:format_error(Reason)})
end.
compile(Source, [{_, OutDir}], Config, ErlOpts) ->
case compile:file(Source, [{outdir, OutDir} | ErlOpts]) of

Loading…
取消
儲存