Permalink
Browse files

Fix a bug in starting application dependencies when a dependency coul…

…dn't be started
  • Loading branch information...
1 parent f9f51e6 commit acfdde0d3c5e26519fc194191b869f15d1d6df81 Yurii Rashkovskii committed Nov 28, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/application.ex
View
@@ -30,8 +30,12 @@ defmodule Application do
case {options[:dependencies], :application.start(application, options[:type])} do
{true, {:error, {:not_started, dep}}} ->
- start(dep, options)
- start(application, options)
+ case start(dep, options) do
+ :ok ->
+ start(application, options)
+ other ->
+ other
+ end
{_, {:error, {:already_started, _}}} -> :ok
{_, other} -> other
end

0 comments on commit acfdde0

Please sign in to comment.