fix resolution of mix tasks
This commit is contained in:
parent
e5a11a6399
commit
45aec319dd
1 changed files with 8 additions and 1 deletions
|
@ -25,7 +25,7 @@ defp mix_task(task, args) do
|
||||||
module = Module.split(module)
|
module = Module.split(module)
|
||||||
|
|
||||||
match?(["Mix", "Tasks", "Pleroma" | _], module) and
|
match?(["Mix", "Tasks", "Pleroma" | _], module) and
|
||||||
String.downcase(List.last(module)) == task
|
task_match?(module, task)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if module do
|
if module do
|
||||||
|
@ -35,6 +35,13 @@ defp mix_task(task, args) do
|
||||||
end
|
end
|
||||||
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
|
def migrate(args) do
|
||||||
Mix.Tasks.Pleroma.Ecto.Migrate.run(args)
|
Mix.Tasks.Pleroma.Ecto.Migrate.run(args)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue