summaryrefslogtreecommitdiff
path: root/src/rebar_prv_install_deps.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-10-22 12:03:49 -0500
committerTristan Sloughter <t@crashfast.com>2014-10-22 19:02:16 -0500
commit1dce2d36cc75263db279abd7f282772ce0f0f3e6 (patch)
treef9d7df28147cfa5029e5333def25469a5809138d /src/rebar_prv_install_deps.erl
parente5c872101fffa52741a29a3bfa06f63f51547020 (diff)
add format_error/2 provider callback to providers
Diffstat (limited to 'src/rebar_prv_install_deps.erl')
-rw-r--r--src/rebar_prv_install_deps.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl
index 2ff7f19..522420d 100644
--- a/src/rebar_prv_install_deps.erl
+++ b/src/rebar_prv_install_deps.erl
@@ -29,7 +29,8 @@
-behaviour(provider).
-export([init/1,
- do/1]).
+ do/1,
+ format_error/2]).
-include("rebar.hrl").
@@ -82,6 +83,10 @@ do(State) ->
{error, Error}
end.
+-spec format_error(any(), rebar_state:t()) -> {iolist(), rebar_state:t()}.
+format_error(Reason, State) ->
+ {io_lib:format("~p", [Reason]), State}.
+
-spec get_deps_dir(rebar_state:t()) -> file:filename_all().
get_deps_dir(State) ->
BaseDir = rebar_state:get(State, base_dir, ""),
@@ -96,7 +101,8 @@ get_deps_dir(DepsDir, App) ->
handle_deps(State, Deps) ->
handle_deps(State, Deps, false).
--spec handle_deps(rebar_state:t(), [dep()], boolean() | {true, binary(), integer()}) -> {ok, rebar_state:t()}.
+-spec handle_deps(rebar_state:t(), [dep()], boolean() | {true, binary(), integer()})
+ -> {ok, rebar_state:t()}.
handle_deps(State, [], _) ->
{ok, State};
handle_deps(State, Deps, Update) ->