1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-27 02:35:04 +01:00

compile fix

This commit is contained in:
Alexander Strizhakov 2020-03-11 16:43:58 +03:00
parent 282a93554f
commit 193d67cde5
No known key found for this signature in database
GPG Key ID: 022896A53AEF1381

View 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)