Skip to content

Commit

Permalink
Raise if none of :name or :app are found in mix.exs
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Oct 12, 2020
1 parent 19cc78f commit f5e80e5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/mix/tasks/docs.ex
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,12 @@ defmodule Mix.Tasks.Docs do
Mix.raise("Extraneous arguments on the command line")
end

project = to_string(config[:name] || config[:app])
project =
to_string(
config[:name] || config[:app] ||
raise("expected :name or :app to be found in the project definition in mix.exs")
)

version = config[:version] || "dev"

options =
Expand Down

0 comments on commit f5e80e5

Please sign in to comment.