respect settings from database in mix tasks
authorAlexander Strizhakov <alex.strizhakov@gmail.com>
Sat, 25 Jan 2020 07:33:27 +0000 (10:33 +0300)
committerAlexander Strizhakov <alex.strizhakov@gmail.com>
Sat, 25 Jan 2020 07:33:27 +0000 (10:33 +0300)
lib/mix/tasks/pleroma/emoji.ex
lib/mix/tasks/pleroma/robotstxt.ex

index 35669af274301228b571534223a31d5e6c2a745f..24d999707381b4ed500949db38cf4fe5cabdb1f2 100644 (file)
@@ -9,6 +9,7 @@ defmodule Mix.Tasks.Pleroma.Emoji do
   @moduledoc File.read!("docs/administration/CLI_tasks/emoji.md")
 
   def run(["ls-packs" | args]) do
+    Mix.Pleroma.start_pleroma()
     Application.ensure_all_started(:hackney)
 
     {options, [], []} = parse_global_opts(args)
@@ -35,6 +36,7 @@ defmodule Mix.Tasks.Pleroma.Emoji do
   end
 
   def run(["get-packs" | args]) do
+    Mix.Pleroma.start_pleroma()
     Application.ensure_all_started(:hackney)
 
     {options, pack_names, []} = parse_global_opts(args)
index 2128e1cd684d74b5256af7dffbdb857097ba425c..e99dd8502b675dc15b3f60410936a5ce3079f8fd 100644 (file)
@@ -18,6 +18,7 @@ defmodule Mix.Tasks.Pleroma.RobotsTxt do
 
   """
   def run(["disallow_all"]) do
+    Mix.Pleroma.start_pleroma()
     static_dir = Pleroma.Config.get([:instance, :static_dir], "instance/static/")
 
     if !File.exists?(static_dir) do