소스 검색

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().

불러오는 중...
취소
저장