fix compatibility with meilisearch #164
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue