aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_prv_discover.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rlx_prv_discover.erl')
-rw-r--r--src/rlx_prv_discover.erl27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/rlx_prv_discover.erl b/src/rlx_prv_discover.erl
index 0ac4aac..5d09619 100644
--- a/src/rlx_prv_discover.erl
+++ b/src/rlx_prv_discover.erl
@@ -100,22 +100,27 @@ add_common_project_dirs(State) ->
Ebin = filename:join(Root, "ebin"),
lists:foldl(fun(Dir, LibDirs) ->
case ec_file:exists(Dir) of
- true ->
- [erlang:iolist_to_binary(Dir) | LibDirs];
- false ->
- LibDirs
- end
- end, [], [Deps, Lib, Apps, Ebin])
+ true ->
+ [erlang:iolist_to_binary(Dir) | LibDirs];
+ false ->
+ LibDirs
+ end
+ end, [], [Deps, Lib, Apps, Ebin])
end.
-spec add_system_lib_dir(rlx_state:t()) -> [file:name()].
add_system_lib_dir(State) ->
ExcludeSystem = rlx_state:get(State, discover_exclude_system, false),
- case ExcludeSystem of
- true ->
- [];
- false ->
- erlang:iolist_to_binary(code:lib_dir())
+ case rlx_state:get(State, system_libs, undefined) of
+ undefined ->
+ case ExcludeSystem of
+ true ->
+ [];
+ false ->
+ erlang:iolist_to_binary(code:lib_dir())
+ end;
+ SystemLibs ->
+ erlang:iolist_to_binary(SystemLibs)
end.
add_release_output_dir(State) ->