Skip to content

Instantly share code, notes, and snippets.

@maximvl
Created July 15, 2014 09:16
Show Gist options
  • Save maximvl/7caa3ee51b294fdc0ba8 to your computer and use it in GitHub Desktop.
Save maximvl/7caa3ee51b294fdc0ba8 to your computer and use it in GitHub Desktop.
start_deps(X) when not is_list(X) ->
start_deps([X]);
start_deps([]) ->
ok;
start_deps([A|T]) ->
case application:ensure_started(A) of
ok ->
start_deps(T);
{error, {not_started, X}} ->
start_deps([X,A|T]);
Error ->
error_logger:error_report(["app start error",
{"application", A},
Error])
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment