Skip to content

Commit

Permalink
chore: take proper args from codegen args
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Dec 22, 2023
1 parent 9bc5b2a commit 5d246cc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/data_layer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,15 @@ defmodule AshPostgres.DataLayer do
end

def codegen(args) do
# TODO: take args that we care about
{args, _, _} = OptionParser.parse(args, strict: [name: :string])

args =
if args[:name] do
["--name", to_string(args[:name])]
else
[]
end

Mix.Task.run("ash_postgres.generate_migrations", args)
end

Expand Down

0 comments on commit 5d246cc

Please sign in to comment.