elixir - 'Task could not be found' for custom mix task -
i have task thing in lib/mix/tasks/thing.exs
the code is:
defmodule mix.tasks.thing use mix.task def run(_) io.puts "hello world" end end when run mix thing or mix thing the task thing not found or the task thing not found
i've tried running mix compile beforehand, didn't help.
i tried putting code this question directly mix.exs, shown in question. still couldn't run task.
mix tasks need compiled. if rename lib/mix/tasks/thing.exs lib/mix/tasks/thing.ex should work.
you can read more scripted mode (.exs) at: http://elixir-lang.org/getting-started/modules.html#scripted-mode
Comments
Post a Comment