Skip to content

Commit

Permalink
fix: don't ask for confirmation on adding sourceror, skip if present
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Mar 7, 2025
1 parent 9dc7f6d commit a9949db
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions lib/mix/tasks/spark.install.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,24 @@ if Code.ensure_loaded?(Igniter) do

@impl true
def info(_argv, _parent) do
%Igniter.Mix.Task.Info{}
%Igniter.Mix.Task.Info{
schema: [
yes: :boolean
],
aliases: [
y: :yes
]
}
end

@impl true
def igniter(igniter, _argv) do
def igniter(igniter) do
igniter
|> Igniter.Project.Formatter.add_formatter_plugin(Spark.Formatter)
|> Igniter.Project.Deps.add_dep({:sourceror, "~> 1.7", only: [:dev, :test]})
|> Igniter.Project.Deps.add_dep({:sourceror, "~> 1.7", only: [:dev, :test]},
yes?: igniter.args.options[:yes],
notify_on_present?: false
)
|> Igniter.Project.Config.configure(
"config.exs",
:spark,
Expand Down

0 comments on commit a9949db

Please sign in to comment.