compile fix

This commit is contained in:
Alexander Strizhakov 2020-01-17 15:00:20 +03:00
parent 58e8963824
commit b310feeccb
No known key found for this signature in database
GPG key ID: 022896A53AEF1381

View file

@ -68,12 +68,15 @@ defmodule Mix.Tasks.Pleroma.Config do
end end
end end
if Code.ensure_loaded?(Config.Reader) do
defp read_file(config_file), do: Config.Reader.read_imports!(config_file)
else
defp read_file(config_file), do: Mix.Config.eval!(config_file)
end
defp do_migrate_to_db(config_file) do defp do_migrate_to_db(config_file) do
if File.exists?(config_file) do if File.exists?(config_file) do
{custom_config, _paths} = {custom_config, _paths} = read_file(config_file)
if Code.ensure_loaded?(Config.Reader),
do: Config.Reader.read_imports!(config_file),
else: Mix.Config.eval!(config_file)
custom_config custom_config
|> Keyword.keys() |> Keyword.keys()