     if Code.ensure_loaded?(Hex) do
       true
     else
-      shell = Mix.shell
-      shell.info "Could not find Hex, which is needed to build dependency #{inspect app}"
+      shell = Mix.shell()
+      shell.info("Could not find Hex, which is needed to build dependency #{inspect(app)}")
 
-      if shell.yes?("Shall I install Hex? (if running non-interactively, use \"mix local.hex --force\")") do
-        Mix.Tasks.Local.Hex.run ["--force"]
+      confirm_message =
+        "Shall I install Hex? (if running non-interactively, use \"mix local.hex --force\")"
+
+      if shell.yes?(confirm_message) do
+        Mix.Tasks.Local.Hex.run(["--force"])
       else
         false
       end

  """
  def start do
    try do
      Hex.start
    catch
      kind, reason ->
        stacktrace = System.stacktrace
        Mix.shell.error "Could not start Hex. Try fetching a new version with " <>
                        "\"mix local.hex\" or uninstalling it with \"mix archive.uninstall hex.ez\""
        :erlang.raise(kind, reason, stacktrace)
    end
  end

defmodule Mix.Hex do
  @moduledoc false
  @hex_requirement ">= 0.14.0"
  @hex_mirror "https://repo.hex.pm"

  @doc """
  Returns `true` if `Hex` is loaded or installed. Otherwise returns `false`.
