fix: remove erroneous warning while composing tasks
Some checks are pending
CI / ash-ci (push) Waiting to run

This commit is contained in:
Zach Daniel 2024-07-08 15:58:24 -04:00
parent a7e1397940
commit 27b6808408
2 changed files with 6 additions and 2 deletions

View file

@ -93,14 +93,16 @@ defmodule Igniter.Util.Info do
parent,
composing_task_name
),
composes: List.wrap(composing_schema.composes) ++ rest,
composes: rest,
extra_args?: schema.extra_args? || composing_schema.extra_args?,
installs: Keyword.merge(composing_schema.installs, schema.installs),
adds_deps: Keyword.merge(composing_schema.adds_deps, schema.adds_deps)
},
argv,
composing_task_name
parent
)
|> Map.put(:composes, List.wrap(composing_schema.composes))
|> recursively_compose_schema(argv, composing_task_name)
else
_ ->
recursively_compose_schema(

View file

@ -115,6 +115,8 @@ defmodule Igniter.Mix.Task do
require Logger
if source && source != "igniter.install" do
raise "what"
Logger.warning("""
The task #{Mix.Task.task_name(__MODULE__)} is being composed by #{source}, but it does not declare an option schema.
Therefore, all options will be allowed. Tasks that may be composed should define `info/2`.