From cf8d63d860a55e97d8400845805c819ff341213a Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sat, 6 Dec 2014 17:00:01 -0600 Subject: in relx call only include deps dirs if they exist --- src/rebar_prv_release.erl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rebar_prv_release.erl b/src/rebar_prv_release.erl index d9cc40f..d382ab5 100644 --- a/src/rebar_prv_release.erl +++ b/src/rebar_prv_release.erl @@ -33,16 +33,18 @@ init(State) -> -spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}. do(State) -> Options = rebar_state:command_args(State), - DepsDir = [rebar_dir:default_deps_dir(State)], % rebar_dir:deps_dir(State)], + DepsDir = rebar_dir:default_deps_dir(State), + ProfileDepsDir = rebar_dir:deps_dir(State), + LibDirs = lists:usort(rebar_utils:filtermap(fun ec_file:exists/1, [DepsDir, ProfileDepsDir])), OutputDir = filename:join(rebar_dir:profile_dir(State), ?DEFAULT_RELEASE_DIR), AllOptions = string:join(["release" | Options], " "), try case rebar_state:get(State, relx, []) of [] -> - relx:main([{lib_dirs, DepsDir} + relx:main([{lib_dirs, LibDirs} ,{output_dir, OutputDir}], AllOptions); Config -> - relx:main([{lib_dirs, DepsDir} + relx:main([{lib_dirs, LibDirs} ,{config, Config} ,{output_dir, OutputDir}], AllOptions) end, -- cgit v1.1