diff --git a/lib/mix/tasks/phx.gen.release.ex b/lib/mix/tasks/phx.gen.release.ex index dc97c567e2..d4e43c259d 100644 --- a/lib/mix/tasks/phx.gen.release.ex +++ b/lib/mix/tasks/phx.gen.release.ex @@ -236,8 +236,13 @@ defmodule Mix.Tasks.Phx.Gen.Release do url = String.to_charlist(url) Logger.debug("Fetching latest image information from #{url}") - {:ok, _} = Application.ensure_all_started(:inets) - {:ok, _} = Application.ensure_all_started(:ssl) + if function_exported?(Mix, :ensure_application!, 1) do + Mix.ensure_application!(:inets) + Mix.ensure_application!(:ssl) + else + {:ok, _} = Application.ensure_all_started(:inets) + {:ok, _} = Application.ensure_all_started(:ssl) + end if proxy = System.get_env("HTTP_PROXY") || System.get_env("http_proxy") do Logger.debug("Using HTTP_PROXY: #{proxy}")