aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_state.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2013-09-18 20:15:32 -0500
committerTristan Sloughter <[email protected]>2013-09-19 20:26:25 -0500
commit0d1dfed1ac0a1868d943e0174fce9f8bf49e448b (patch)
tree5b7ec9e8819b4a6ceb9c1b87f8db3a77ba4f127d /src/rlx_state.erl
parentdaeae596b93605265273fd474407865211039204 (diff)
downloadrelx-0d1dfed1ac0a1868d943e0174fce9f8bf49e448b.tar.gz
relx-0d1dfed1ac0a1868d943e0174fce9f8bf49e448b.tar.bz2
relx-0d1dfed1ac0a1868d943e0174fce9f8bf49e448b.zip
add lib_dirs option to for config file, same as -l cli arg
Diffstat (limited to 'src/rlx_state.erl')
-rw-r--r--src/rlx_state.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rlx_state.erl b/src/rlx_state.erl
index 6d3c4ee..138705c 100644
--- a/src/rlx_state.erl
+++ b/src/rlx_state.erl
@@ -28,6 +28,7 @@
actions/1,
output_dir/1,
lib_dirs/1,
+ add_lib_dirs/2,
overrides/1,
overrides/2,
skip_apps/1,
@@ -152,7 +153,6 @@ overrides(#state_t{overrides=Overrides}) ->
overrides(State, Overrides) ->
State#state_t{overrides=Overrides}.
-
-spec skip_apps(t()) -> [AppName::atom()].
skip_apps(#state_t{skip_apps=Apps}) ->
Apps.
@@ -175,6 +175,10 @@ output_dir(#state_t{output_dir=OutDir}) ->
lib_dirs(#state_t{lib_dirs=LibDir}) ->
LibDir.
+-spec add_lib_dirs(t(), [file:name()]) -> t().
+add_lib_dirs(State=#state_t{lib_dirs=LibDir}, Dirs) ->
+ State#state_t{lib_dirs=lists:merge(lists:sort(LibDir), lists:sort(Dirs))}.
+
-spec goals(t()) -> [rlx_depsolver:constraint()].
goals(#state_t{goals=TS}) ->
TS.