Skip to content

Commit

Permalink
Fix package command behaviour
Browse files Browse the repository at this point in the history
Print the help text if no subtask is provided.
  • Loading branch information
ziopio committed Sep 16, 2024
1 parent 93d9c0c commit 31db45f
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/rebar3_grisp_package.erl
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@ task_help("list", _Args, RState) ->
" -x, --hash List package hashes [default: false]~n"
),
RState;
task_help("download", _Args, RState) ->
console(
"Download packages~n"
"~n"
"Foo"
),
RState;
task_help(undefined, _Args, RState) ->
Args = [atom_to_list(A) || A <- [?NAMESPACE, ?TASK]],
{ok, RState2} = rebar_prv_help:do(rebar_state:command_args(RState, Args)),
Expand Down Expand Up @@ -115,11 +108,8 @@ task_run("list", {Args, _Rest}, RState) ->
abort("Listing of ~p ~p packages not supported", [Source, Type])
end,
RState;
task_run("download", {Args, _Rest}, RState) ->
console("~p", [Args]),
RState;
task_run(Task, _Args, _State) ->
abort("~p: unknown task: ~s", [?TASK, Task]).
task_run(Task, _Args, RState) ->
task_help(undefined, _Args, RState).

parse_columns(otp, undefined) ->
[version];
Expand Down

0 comments on commit 31db45f

Please sign in to comment.