summaryrefslogtreecommitdiff
path: root/lib/mix/tasks
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2020-07-14 18:56:40 -0500
committerAlex Gleason <alex@alexgleason.me>2020-07-14 18:56:40 -0500
commit48983e942139a81106416cfbb8d22743b6764053 (patch)
tree1c11c31848609a9e6b8226bc6ac77d3747e1986a /lib/mix/tasks
parentdf3d1bf5e57389e41a70676ccab1df81d83e3d74 (diff)
parent3f65f2ea79644cd8a119fc154c2792994723c7cb (diff)
downloadpleroma-48983e942139a81106416cfbb8d22743b6764053.tar.gz
pleroma-48983e942139a81106416cfbb8d22743b6764053.zip
Merge remote-tracking branch 'upstream/develop' into by-approval
Diffstat (limited to 'lib/mix/tasks')
-rw-r--r--lib/mix/tasks/pleroma/config.ex8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/mix/tasks/pleroma/config.ex b/lib/mix/tasks/pleroma/config.ex
index d5129d410..904c5a74b 100644
--- a/lib/mix/tasks/pleroma/config.ex
+++ b/lib/mix/tasks/pleroma/config.ex
@@ -83,7 +83,7 @@ defmodule Mix.Tasks.Pleroma.Config do
defp migrate_from_db(opts) do
if Pleroma.Config.get([:configurable_from_database]) do
- env = opts[:env] || "prod"
+ env = opts[:env] || Pleroma.Config.get(:env)
config_path =
if Pleroma.Config.get(:release) do
@@ -105,6 +105,10 @@ defmodule Mix.Tasks.Pleroma.Config do
:ok = File.close(file)
System.cmd("mix", ["format", config_path])
+
+ shell_info(
+ "Database configuration settings have been exported to config/#{env}.exported_from_db.secret.exs"
+ )
else
migration_error()
end
@@ -112,7 +116,7 @@ defmodule Mix.Tasks.Pleroma.Config do
defp migration_error do
shell_error(
- "Migration is not allowed in config. You can change this behavior by setting `configurable_from_database` to true."
+ "Migration is not allowed in config. You can change this behavior by setting `config :pleroma, configurable_from_database: true`"
)
end