diff options
author | Anthony Ramine <nox@dev-extend.eu> | 2011-02-15 01:51:35 +0100 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-02-15 18:32:42 +0100 |
commit | 9ee8ed91812f22e6e84887ba006f3a5c37457fcc (patch) | |
tree | f46e2f2791559b1509efe7bc237d2cb1a7468f04 /src | |
parent | 1b1080719399cc952d244fbe68b0e53bc3e213d3 (diff) |
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".
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_erlc_compiler.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 7f02e89..df9e1c0 100644 --- a/src/rebar_erlc_compiler.erl +++ b/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) |