From 4af177bd06874ff16d9e0ce5d59a201d27955ee6 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 11 Dec 2013 10:06:22 +0100 Subject: [PATCH] Print a more appropriate message on 'rebar info' To avoid treating plugins' info/2 functions as commands, we catch calls to 'rebar info'. Previously (4b8c81fb) we simply printed the help string, but it's much more informative to print the following: Command 'info' not understood or not applicable --- src/rebar.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rebar.erl b/src/rebar.erl index 00505be..5e48578 100644 --- a/src/rebar.erl +++ b/src/rebar.erl @@ -87,7 +87,9 @@ run(["help"|RawCmds]) when RawCmds =/= [] -> run(["help"]) -> help(); run(["info"|_]) -> - help(); + %% Catch calls to 'rebar info' to avoid treating plugins' info/2 functions + %% as commands. + ?CONSOLE("Command 'info' not understood or not applicable~n", []); run(["version"]) -> ok = load_rebar_app(), %% Display vsn and build time info