From 45aec319dd8ab788e7cc051fb3e8abf3d959f8c2 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Tue, 16 Aug 2022 23:50:31 +0100 Subject: [PATCH] fix resolution of mix tasks --- lib/pleroma/release_tasks.ex | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/release_tasks.ex b/lib/pleroma/release_tasks.ex index 1e06aafe4..a3fbde397 100644 --- a/lib/pleroma/release_tasks.ex +++ b/lib/pleroma/release_tasks.ex @@ -25,7 +25,7 @@ defp mix_task(task, args) do module = Module.split(module) match?(["Mix", "Tasks", "Pleroma" | _], module) and - String.downcase(List.last(module)) == task + task_match?(module, task) end) if module do @@ -35,6 +35,13 @@ defp mix_task(task, args) do end end + defp task_match?(module_path, task) do + module_path + |> Enum.join(".") + |> String.downcase() + |> String.ends_with?(String.downcase(task)) + end + def migrate(args) do Mix.Tasks.Pleroma.Ecto.Migrate.run(args) end