summaryrefslogtreecommitdiff
path: root/src/rebar_prv_help.erl
diff options
context:
space:
mode:
authorStuart Thackray <stuart.thackray@gmail.com>2018-12-11 08:53:29 +0200
committerStuart Thackray <stuart.thackray@gmail.com>2018-12-11 08:53:29 +0200
commitebfa797c1f5d038b99beaf658757d974412a15c7 (patch)
tree9765880a7f0119c265d85f8bac7afea8d9542080 /src/rebar_prv_help.erl
parent71187514dabdd94aa333495d92df84a2e750099f (diff)
parent8e28561d4e14ea85d42d17ab5a0f17f5f1c696d2 (diff)
Update from Upstream
Diffstat (limited to 'src/rebar_prv_help.erl')
-rw-r--r--src/rebar_prv_help.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rebar_prv_help.erl b/src/rebar_prv_help.erl
index c028264..f34c755 100644
--- a/src/rebar_prv_help.erl
+++ b/src/rebar_prv_help.erl
@@ -41,7 +41,10 @@ do(State) ->
[Name] -> % default namespace
task_help(default, list_to_atom(Name), State);
[Namespace, Name] ->
- task_help(list_to_atom(Namespace), list_to_atom(Name), State)
+ task_help(list_to_atom(Namespace), list_to_atom(Name), State);
+ _ ->
+ {error, "Too many arguments given. " ++
+ "Usage: rebar3 help [<namespace>] <task>"}
end.
-spec format_error(any()) -> iolist().
@@ -54,7 +57,7 @@ format_error(Reason) ->
help(State) ->
?CONSOLE("Rebar3 is a tool for working with Erlang projects.~n~n", []),
OptSpecList = rebar3:global_option_spec_list(),
- getopt:usage(OptSpecList, "rebar", "", []),
+ getopt:usage(OptSpecList, "rebar3", "", []),
?CONSOLE("~nSeveral tasks are available:~n", []),
providers:help(rebar_state:providers(State)),