diff options
author | Eric Merritt <[email protected]> | 2014-01-18 08:44:32 -0800 |
---|---|---|
committer | Eric Merritt <[email protected]> | 2014-01-18 08:44:32 -0800 |
commit | d6e73ebd791a646efdea966a58cba62f388a773e (patch) | |
tree | a63486581345c3d028af1029b73fb7bc49b6a5cb /src | |
parent | efecde83481e6603f2ccfd4a5e608c006296ffc4 (diff) | |
parent | 95c4565d078033c18561813c48c20de11ed9ab88 (diff) | |
download | relx-d6e73ebd791a646efdea966a58cba62f388a773e.tar.gz relx-d6e73ebd791a646efdea966a58cba62f388a773e.tar.bz2 relx-d6e73ebd791a646efdea966a58cba62f388a773e.zip |
Merge pull request #96 from konradkaplita/disable_rel_discovery
Add option to skip release discovery
Diffstat (limited to 'src')
-rw-r--r-- | src/rlx_rel_discovery.erl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/rlx_rel_discovery.erl b/src/rlx_rel_discovery.erl index 837ebe6..23c0ab9 100644 --- a/src/rlx_rel_discovery.erl +++ b/src/rlx_rel_discovery.erl @@ -38,12 +38,18 @@ -spec do(rlx_state:t(), [file:name()], [rlx_app_info:t()]) -> {ok, [rlx_release:t()]} | relx:error(). do(State, LibDirs, AppMeta) -> - ec_cmd_log:info(rlx_state:log(State), - fun() -> - ["Resolving available OTP Releases from directories:\n", - string:join([[rlx_util:indent(2), LibDir] || LibDir <- LibDirs], "\n")] - end), - resolve_rel_metadata(State, LibDirs, AppMeta). + case rlx_state:get(State, disable_rel_discovery, false) of + true -> + ec_cmd_log:debug(rlx_state:log(State), "Disbaled resolving of OTP releases"), + {ok, []}; + false -> + ec_cmd_log:info(rlx_state:log(State), + fun() -> + ["Resolving available OTP Releases from directories:\n", + string:join([[rlx_util:indent(2), LibDir] || LibDir <- LibDirs], "\n")] + end), + resolve_rel_metadata(State, LibDirs, AppMeta) + end. -spec format_error([ErrorDetail::term()]) -> iolist(). format_error(ErrorDetails) |