aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks
diff options
context:
space:
mode:
authorHugo Müller-Downing <github@hu.md>2020-08-16 14:02:33 +1000
committerHugo Müller-Downing <github@hu.md>2020-08-17 17:34:03 +1000
commit317b6c6c526d14dda928abeb411a76dac53849db (patch)
tree5c30520176705417c3331b6fdb7f8800a1239623 /lib/mix/tasks
parentec242b470654e5e66e3d3a36e8d7563e15b08016 (diff)
downloadpleroma-317b6c6c526d14dda928abeb411a76dac53849db.tar.gz
Start :ssl if not started when running migration or rollback
Diffstat (limited to 'lib/mix/tasks')
-rw-r--r--lib/mix/tasks/pleroma/ecto/migrate.ex4
-rw-r--r--lib/mix/tasks/pleroma/ecto/rollback.ex4
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/mix/tasks/pleroma/ecto/migrate.ex b/lib/mix/tasks/pleroma/ecto/migrate.ex
index bc8ed29fb..e903bd171 100644
--- a/lib/mix/tasks/pleroma/ecto/migrate.ex
+++ b/lib/mix/tasks/pleroma/ecto/migrate.ex
@@ -41,6 +41,10 @@ defmodule Mix.Tasks.Pleroma.Ecto.Migrate do
load_pleroma()
{opts, _} = OptionParser.parse!(args, strict: @switches, aliases: @aliases)
+ if Application.get_env(:pleroma, Pleroma.Repo)[:ssl] do
+ Application.ensure_all_started(:ssl)
+ end
+
opts =
if opts[:to] || opts[:step] || opts[:all],
do: opts,
diff --git a/lib/mix/tasks/pleroma/ecto/rollback.ex b/lib/mix/tasks/pleroma/ecto/rollback.ex
index f43bd0b98..3dba952cb 100644
--- a/lib/mix/tasks/pleroma/ecto/rollback.ex
+++ b/lib/mix/tasks/pleroma/ecto/rollback.ex
@@ -40,6 +40,10 @@ defmodule Mix.Tasks.Pleroma.Ecto.Rollback do
load_pleroma()
{opts, _} = OptionParser.parse!(args, strict: @switches, aliases: @aliases)
+ if Application.get_env(:pleroma, Pleroma.Repo)[:ssl] do
+ Application.ensure_all_started(:ssl)
+ end
+
opts =
if opts[:to] || opts[:step] || opts[:all],
do: opts,