Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elixir custom task does not show up on "mix help"

Is the following code not enough to list a custom task on mix help?

defmodule Mix.Tasks.Start do
  use Mix.Task

  @shortdoc "Starts [App]"
  def run(_) do
    IO.puts("Starting [App]...")
  end
end

I thought that the decorator @shortdoc was enough to list my custom task on mix help but I recompile my code and my custom task is not being listed on mix help.

like image 973
Jeff Pal Avatar asked Sep 15 '25 21:09

Jeff Pal


1 Answers

In trying it out myself I had to add both a @moduledoc and a @shortdoc. Then I had to run mix compile to get the task on the list in mix help.

like image 50
Brett Beatty Avatar answered Sep 21 '25 22:09

Brett Beatty