Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Lager to 3.9.0 and output better rpc output for nodetool
Browse files Browse the repository at this point in the history
depends on erlware/relx#855
  • Loading branch information
Vagabond committed Feb 25, 2021
1 parent c7ebaba commit 5d31c23
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}.

{deps, [
{lager, ".*", {git, "https://github.com/erlang-lager/lager.git", {branch, "master"}}},
{lager, "3.9.0"},
{erl_base58, "0.0.1"},
{base64url, "1.0.1"},
{libp2p, ".*", {git, "https://github.com/helium/erlang-libp2p.git", {branch, "master"}}},
Expand Down
6 changes: 2 additions & 4 deletions rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@
{ref,"e30b65d32711a4b7033fd4ac9b33b3c1c8be8bed"}},
1},
{<<"intercept">>,{pkg,<<"intercept">>,<<"1.0.0">>},2},
{<<"lager">>,
{git,"https://github.com/erlang-lager/lager.git",
{ref,"91575d4479c897451edf138c10fa86c3125ec52e"}},
0},
{<<"lager">>,{pkg,<<"lager">>,<<"3.9.0">>},0},
{<<"libp2p">>,
{git,"https://github.com/helium/erlang-libp2p.git",
{ref,"516382eb09dbc6f46350796a202159fbb916fa26"}},
Expand Down Expand Up @@ -103,6 +100,7 @@
{<<"inert">>, <<"E5C7568C5EF0C6103FEDB1CBDB29F32D701985E3588E1FAC37AEBA96671BA11B">>},
{<<"inet_cidr">>, <<"4814A5B78B969A5E069B0CECBB102622AB0C459B690053ED94543CD529915A43">>},
{<<"intercept">>, <<"1F6C725E6FC070720643BD4D97EE53B1209365C80E520E1F5A1ACB36712A7EB5">>},
{<<"lager">>, <<"903A7303E3542F000F28F94B5C1B1A958A49F5E84FDAF6DF8549D3596EE5AE3D">>},
{<<"libp2p_crypto">>, <<"A42341EC65C7A087E1F4D3FA29A618EEEA289B00AFFA65849E1470B8DF77C87D">>},
{<<"multiaddr">>, <<"978E58E28F6FACAF428C87AF933612B1E2F3F2775F1794EDA5E831A4EACD2984">>},
{<<"procket">>, <<"1FC0D557ACC0145DD167C566C68F83B183E923016904DFE980534B3C9150E92B">>},
Expand Down
20 changes: 19 additions & 1 deletion src/cli/blockchain_console.erl
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,22 @@

-spec command([string()]) -> ok.
command(Cmd) ->
clique:run(Cmd).
%% this is the contents of clique:run but
%% we want to figure out if the command worked
%% or not
M0 = clique_command:match(Cmd),
M1 = clique_parser:parse(M0),
M2 = clique_parser:extract_global_flags(M1),
M3 = clique_parser:validate(M2),
M4 = clique_command:run(M3),
clique:print(M4, Cmd),
case M4 of
usage ->
{rpc_error, 1};
{error, _} ->
{rpc_error, 2};
{_Status, ExitCode, _} when ExitCode == 0 ->
rpc_ok;
{_Status, ExitCode, _} ->
{rpc_error, ExitCode}
end.

0 comments on commit 5d31c23

Please sign in to comment.