diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-10-22 12:03:49 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-10-22 19:02:16 -0500 |
commit | 1dce2d36cc75263db279abd7f282772ce0f0f3e6 (patch) | |
tree | f9d7df28147cfa5029e5333def25469a5809138d /src/rebar_prv_shell.erl | |
parent | e5c872101fffa52741a29a3bfa06f63f51547020 (diff) |
add format_error/2 provider callback to providers
Diffstat (limited to 'src/rebar_prv_shell.erl')
-rw-r--r-- | src/rebar_prv_shell.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rebar_prv_shell.erl b/src/rebar_prv_shell.erl index e74486d..24e357b 100644 --- a/src/rebar_prv_shell.erl +++ b/src/rebar_prv_shell.erl @@ -31,7 +31,8 @@ -behaviour(provider). -export([init/1, - do/1]). + do/1, + format_error/2]). -include("rebar.hrl"). @@ -59,6 +60,10 @@ do(Config) -> shell(), {ok, Config}. +-spec format_error(any(), rebar_state:t()) -> {iolist(), rebar_state:t()}. +format_error(Reason, State) -> + {io_lib:format("~p", [Reason]), State}. + %% NOTE: %% this is an attempt to replicate `erl -pa ./ebin -pa deps/*/ebin`. it is %% mostly successful but does stop and then restart the user io system to get |