compile fix
authorAlexander Strizhakov <alex.strizhakov@gmail.com>
Wed, 11 Mar 2020 13:43:58 +0000 (16:43 +0300)
committerAlexander Strizhakov <alex.strizhakov@gmail.com>
Wed, 11 Mar 2020 13:43:58 +0000 (16:43 +0300)
lib/pleroma/config/loader.ex

index b2cb34129ed81dbb946dd981d7584f945d1d9daa..6ca6550bd7d37b434c13469376da4a7c582b6a9b 100644 (file)
@@ -14,13 +14,19 @@ defmodule Pleroma.Config.Loader do
 
   if Code.ensure_loaded?(Config.Reader) do
     @reader Config.Reader
+
+    def read(path), do: @reader.read!(path)
   else
     # support for Elixir less than 1.9
     @reader Mix.Config
+    def read(path) do
+      path
+      |> @reader.eval!()
+      |> elem(0)
+    end
   end
 
   @spec read(Path.t()) :: keyword()
-  def read(path), do: @reader.read!(path)
 
   @spec merge(keyword(), keyword()) :: keyword()
   def merge(c1, c2), do: @reader.merge(c1, c2)