diff options
Diffstat (limited to 'src/rebar_prv_do.erl')
-rw-r--r-- | src/rebar_prv_do.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rebar_prv_do.erl b/src/rebar_prv_do.erl index c8f383d..5f6e751 100644 --- a/src/rebar_prv_do.erl +++ b/src/rebar_prv_do.erl @@ -32,14 +32,13 @@ init(State) -> -spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}. do(State) -> Tasks = args_to_tasks(rebar_state:command_args(State)), - State1 = lists:foldl(fun(TaskArgs, {ok, StateAcc}) -> + lists:foldl(fun(TaskArgs, {ok, StateAcc}) -> [TaskStr | Args] = string:tokens(TaskArgs, " "), Task = list_to_atom(TaskStr), StateAcc1 = rebar_state:set(StateAcc, task, Task), StateAcc2 = rebar_state:command_args(StateAcc1, Args), rebar_core:process_command(StateAcc2, Task) - end, {ok, State}, Tasks), - {ok, State1}. + end, {ok, State}, Tasks). args_to_tasks(Args) -> [string:strip(T) || T <- string:tokens(string:join(Args, " "), ",")]. |