浏览代码

prepend base_dir when expanding code path

pull/3/head
Tristan Sloughter 10 年前
父节点
当前提交
0608e5087b
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. +1
    -0
      include/rebar.hrl
  2. +3
    -2
      src/rebar_core.erl

+ 1
- 0
include/rebar.hrl 查看文件

@ -13,6 +13,7 @@
-define(FMT(Str, Args), lists:flatten(io_lib:format(Str, Args))).
-define(DEFAULT_BASE_DIR, "").
-define(DEFAULT_LIB_DIRS, ["_checkouts", "apps", "lib", "."]).
-define(DEFAULT_DEPS_DIR, "_deps").
-define(DEFAULT_PLUGINS_DIR, "_plugins").

+ 3
- 2
src/rebar_core.erl 查看文件

@ -70,9 +70,10 @@ do([ProviderName | Rest], State) ->
update_code_path(State) ->
true = rebar_utils:expand_code_path(),
BaseDir = rebar_state:get(State, base_dir, ?DEFAULT_BASE_DIR),
LibDirs = rebar_state:get(State, lib_dirs, ?DEFAULT_LIB_DIRS),
DepsDir = rebar_state:get(State, deps_dir, ?DEFAULT_DEPS_DIR),
PluginsDir = rebar_state:get(State, plugins_dir, ?DEFAULT_PLUGINS_DIR),
DepsDir = filename:join(BaseDir, rebar_state:get(State, deps_dir, ?DEFAULT_DEPS_DIR)),
PluginsDir = filename:join(BaseDir, rebar_state:get(State, plugins_dir, ?DEFAULT_PLUGINS_DIR)),
_UpdatedCodePaths = update_code_path_([DepsDir, PluginsDir | LibDirs]).

正在加载...
取消
保存