summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-12-02 13:00:07 -0600
committerMark Felder <feld@FreeBSD.org>2020-12-02 14:20:11 -0600
commit25fab7da69e2a6019598132e5d776d7cebe42045 (patch)
treee73ddc49db016c13170af8b8982c90c78266270c
parent13947999ad28eac6668a601bf957d2e64edda9d3 (diff)
No need for a separate functions here
-rw-r--r--lib/mix/tasks/pleroma/config.ex18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/mix/tasks/pleroma/config.ex b/lib/mix/tasks/pleroma/config.ex
index d509f150e..e53e21a0b 100644
--- a/lib/mix/tasks/pleroma/config.ex
+++ b/lib/mix/tasks/pleroma/config.ex
@@ -184,7 +184,8 @@ defmodule Mix.Tasks.Pleroma.Config do
do_migrate_to_db(config_file)
else
- _ -> deprecation_error()
+ _ ->
+ shell_error("Migration is not allowed until all deprecation warnings have been resolved.")
end
end
@@ -248,10 +249,6 @@ defmodule Mix.Tasks.Pleroma.Config do
)
end
- defp deprecation_error do
- shell_error("Migration is not allowed until all deprecation warnings have been resolved.")
- end
-
if Code.ensure_loaded?(Config.Reader) do
defp config_header, do: "import Config\r\n\r\n"
defp read_file(config_file), do: Config.Reader.read_imports!(config_file)
@@ -290,12 +287,6 @@ defmodule Mix.Tasks.Pleroma.Config do
shell_info("config #{inspect(config.group)}, #{inspect(config.key)}, #{value}\r\n\r\n")
end
- defp configdb_not_enabled do
- shell_error(
- "ConfigDB not enabled. Please check the value of :configurable_from_database in your configuration."
- )
- end
-
defp dump_key(group, key) when is_atom(group) and is_atom(key) do
ConfigDB
|> Repo.all()
@@ -349,7 +340,10 @@ defmodule Mix.Tasks.Pleroma.Config do
with true <- Pleroma.Config.get([:configurable_from_database]) do
callback.()
else
- _ -> configdb_not_enabled()
+ _ ->
+ shell_error(
+ "ConfigDB not enabled. Please check the value of :configurable_from_database in your configuration."
+ )
end
end
end