浏览代码

Print error on too many help arguments

Previously the help task would crash when given more than two
arguments. After this change it instead print a message:

    Too many arguments given. Usage: rebar3 help [<namespace>] <task>
pull/1300/head
Rasmus Svensson 8 年前
父节点
当前提交
4c2873d213
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      src/rebar_prv_help.erl

+ 4
- 1
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().

正在加载...
取消
保存