Make mix tasks work in a release
[akkoma] / lib / mix / tasks / pleroma / relay.ex
index 03586d6c3bb0bf702a8e4784828581cfcf7e86a8..213ae24d206997e02ead0ec165dd9218bb2f7bc8 100644 (file)
@@ -1,7 +1,11 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
 defmodule Mix.Tasks.Pleroma.Relay do
   use Mix.Task
-  alias Pleroma.Web.ActivityPub.Relay
   alias Mix.Tasks.Pleroma.Common
+  alias Pleroma.Web.ActivityPub.Relay
 
   @shortdoc "Manages remote relays"
   @moduledoc """
@@ -26,7 +30,7 @@ defmodule Mix.Tasks.Pleroma.Relay do
       # put this task to sleep to allow the genserver to push out the messages
       :timer.sleep(500)
     else
-      {:error, e} -> Mix.shell().error("Error while following #{target}: #{inspect(e)}")
+      {:error, e} -> Common.shell_error("Error while following #{target}: #{inspect(e)}")
     end
   end
 
@@ -37,7 +41,7 @@ defmodule Mix.Tasks.Pleroma.Relay do
       # put this task to sleep to allow the genserver to push out the messages
       :timer.sleep(500)
     else
-      {:error, e} -> Mix.shell().error("Error while following #{target}: #{inspect(e)}")
+      {:error, e} -> Common.shell_error("Error while following #{target}: #{inspect(e)}")
     end
   end
 end