       else
         deps_path
         |> Path.join(to_string(app))
-        |> File.rm_rf!
+        |> File.rm_rf!()
       end
-    end
+    end)
   end
 end

  end

  defp maybe_warn_for_invalid_path([], dependency) do
    Mix.shell.error "warning: the dependency #{dependency} is not present in the build directory"
    []
  end
  defp maybe_warn_for_invalid_path(paths, _dependency) do
    paths
  end

  defp do_clean(apps, deps, build_path, deps_path, build_only?) do
    shell = Mix.shell

    local =
      for %{scm: scm, app: app} <- deps,
          not scm.fetchable?,
          do: Atom.to_string(app)

    Enum.each apps, fn app ->
      shell.info "* Cleaning #{app}"

      # Remove everything from the build directory of dependencies
      build_path
      |> Path.join(to_string(app))
      |> Path.wildcard
      |> maybe_warn_for_invalid_path(app)
      |> Enum.each(&File.rm_rf!/1)


      Path.basename(path)
    end
    |> Enum.uniq()
    |> List.delete(to_string(Mix.Project.config()[:app]))
  end

  defp filter_loaded(apps, deps) do
