compile fix
This commit is contained in:
parent
282a93554f
commit
193d67cde5
|
@ -14,13 +14,19 @@ defmodule Pleroma.Config.Loader do
|
||||||
|
|
||||||
if Code.ensure_loaded?(Config.Reader) do
|
if Code.ensure_loaded?(Config.Reader) do
|
||||||
@reader Config.Reader
|
@reader Config.Reader
|
||||||
|
|
||||||
|
def read(path), do: @reader.read!(path)
|
||||||
else
|
else
|
||||||
# support for Elixir less than 1.9
|
# support for Elixir less than 1.9
|
||||||
@reader Mix.Config
|
@reader Mix.Config
|
||||||
|
def read(path) do
|
||||||
|
path
|
||||||
|
|> @reader.eval!()
|
||||||
|
|> elem(0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec read(Path.t()) :: keyword()
|
@spec read(Path.t()) :: keyword()
|
||||||
def read(path), do: @reader.read!(path)
|
|
||||||
|
|
||||||
@spec merge(keyword(), keyword()) :: keyword()
|
@spec merge(keyword(), keyword()) :: keyword()
|
||||||
def merge(c1, c2), do: @reader.merge(c1, c2)
|
def merge(c1, c2), do: @reader.merge(c1, c2)
|
||||||
|
|
Loading…
Reference in a new issue