瀏覽代碼

don't include all */ebin dirs in code path

pull/61/head
Tristan Sloughter 10 年之前
父節點
當前提交
31b886e65c
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. +8
    -1
      src/rebar_core.erl

+ 8
- 1
src/rebar_core.erl 查看文件

@ -93,7 +93,14 @@ update_code_path_(Paths) ->
expand_lib_dirs([], _Root, Acc) -> expand_lib_dirs([], _Root, Acc) ->
Acc; Acc;
expand_lib_dirs([Dir | Rest], Root, Acc) -> expand_lib_dirs([Dir | Rest], Root, Acc) ->
Apps = filelib:wildcard(filename:join([Dir, "*", "ebin"])),
%% The current dir should only have an ebin dir.
%% Other lib dirs contain app directories, so need the wildcard
Apps = case Dir of
"." ->
[filename:join(Dir, "ebin")];
_ ->
filelib:wildcard(filename:join([Dir, "*", "ebin"]))
end,
FqApps = case filename:pathtype(Dir) of FqApps = case filename:pathtype(Dir) of
absolute -> Apps; absolute -> Apps;
_ -> [filename:join([Root, A]) || A <- Apps] _ -> [filename:join([Root, A]) || A <- Apps]

Loading…
取消
儲存