From b310feeccb03a9bc232b49d93fb03805e3d5c2d8 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Fri, 17 Jan 2020 15:00:20 +0300 Subject: [PATCH] compile fix --- lib/mix/tasks/pleroma/config.ex | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/mix/tasks/pleroma/config.ex b/lib/mix/tasks/pleroma/config.ex index 3157e7b20..d2abbd885 100644 --- a/lib/mix/tasks/pleroma/config.ex +++ b/lib/mix/tasks/pleroma/config.ex @@ -68,12 +68,15 @@ defmodule Mix.Tasks.Pleroma.Config do 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 if File.exists?(config_file) do - {custom_config, _paths} = - if Code.ensure_loaded?(Config.Reader), - do: Config.Reader.read_imports!(config_file), - else: Mix.Config.eval!(config_file) + {custom_config, _paths} = read_file(config_file) custom_config |> Keyword.keys() -- 2.45.2