瀏覽代碼

Give an absolute path to code:add_path/1

If an app uses -include_lib for its own included files, compilation
fails if the app directory isn't in $ERL_LIBS because code:lib_dir/1
will return an error. An absolute path needs to be added to code path
instead of just "ebin".
pull/3/head
Anthony Ramine 14 年之前
committed by Tuncer Ayaz
父節點
當前提交
9ee8ed9181
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/rebar_erlc_compiler.erl

+ 1
- 1
src/rebar_erlc_compiler.erl 查看文件

@ -152,7 +152,7 @@ doterl_compile(Config, OutDir, MoreSources) ->
%% Make sure that ebin/ exists and is on the path
ok = filelib:ensure_dir(filename:join("ebin", "dummy.beam")),
CurrPath = code:get_path(),
true = code:add_path("ebin"),
true = code:add_path(filename:absname("ebin")),
rebar_base_compiler:run(Config, NewFirstErls, OtherErls,
fun(S, C) ->
internal_erl_compile(S, C, OutDir, ErlOpts)

Loading…
取消
儲存