Print whole config when resetting and include a scary looking message.
authorMark Felder <feld@FreeBSD.org>
Fri, 27 Nov 2020 22:32:46 +0000 (16:32 -0600)
committerMark Felder <feld@FreeBSD.org>
Wed, 2 Dec 2020 16:43:22 +0000 (10:43 -0600)
lib/mix/tasks/pleroma/config.ex

index a7c307f7784743d0d8fd7060a392b8b2b28a6ba6..0c8170c9c1c0823e366c3de993e4f4f6d04a21b9 100644 (file)
@@ -131,6 +131,15 @@ defmodule Mix.Tasks.Pleroma.Config do
     with true <- Pleroma.Config.get([:configurable_from_database]) do
       start_pleroma()
 
+      shell_info("The following settings will be permanently removed:")
+
+      ConfigDB
+      |> Repo.all()
+      |> Enum.sort()
+      |> Enum.each(&dump(&1))
+
+      shell_error("THIS CANNOT BE UNDONE!")
+
       if shell_prompt("Are you sure you want to continue?", "n") in ~w(Yn Y y) do
         Ecto.Adapters.SQL.query!(Repo, "TRUNCATE config;")
         Ecto.Adapters.SQL.query!(Repo, "ALTER SEQUENCE config_id_seq RESTART;")