   defp manager_to_env(:rebar3), do: "MIX_REBAR3"
 
   defp eval_script(script_path, config) do
-    script = Path.basename(script_path) |> String.to_charlist
-
-    result = File.cd!(Path.dirname(script_path), fn ->
-      :file.script(script, eval_binds(CONFIG: config, SCRIPT: script))
-    end)
+    script = String.to_charlist(Path.basename(script_path))
+
+    result =
+      File.cd!(Path.dirname(script_path), fn ->
+        :file.script(script, eval_binds(CONFIG: config, SCRIPT: script))
+      end)
 
     case result do
       {:ok, config} ->
         config
+
       {:error, error} ->
         reason = :file.format_error(error)
-        Mix.shell.error("Error evaluating Rebar config script #{script_path}:#{reason}")
-        Mix.shell.error("Any dependencies defined in the script won't be available " <>
-                        "unless you add them to your Mix project")
+        Mix.shell().error("Error evaluating Rebar config script #{script_path}:#{reason}")
+
+        Mix.shell().error(
+          "Any dependencies defined in the script won't be available " <>
+            "unless you add them to your Mix project"
+        )
+
         config
     end
   end
 
   defp eval_binds(binds) do
-    Enum.reduce(binds, :erl_eval.new_bindings, fn({k, v}, binds) ->
+    Enum.reduce(binds, :erl_eval.new_bindings(), fn {k, v}, binds ->
       :erl_eval.add_binding(k, v, binds)
     end)
   end
 
   defp wrap_cmd(rebar) do
     cond do
-      not match?({:win32, _}, :os.type) ->
+      not match?({:win32, _}, :os.type()) ->
         rebar
+
       String.ends_with?(rebar, ".cmd") ->
         "\"#{String.replace(rebar, "/", "\\")}\""
+
       true ->
         "escript.exe \"#{rebar}\""
     end

  Returns the path supposed to host the local copy of `rebar`.
  """
  def local_rebar_path(manager) do
    Path.join(Mix.Utils.mix_home, Atom.to_string(manager))
  end

  @doc """

  """
  def local_rebar_cmd(manager) do
    cmd = local_rebar_path(manager)

    if File.regular?(cmd) do
      wrap_cmd(cmd)
    end
