From 59d1c3d6cc1a42151e6631a046cc6a7ea252414f Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Sat, 17 Aug 2024 12:05:33 -0400 Subject: [PATCH] fix: properly handle new igniter installer functions --- lib/mix/tasks/ash_postgres.install.ex | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/mix/tasks/ash_postgres.install.ex b/lib/mix/tasks/ash_postgres.install.ex index ceba062..959e6c4 100644 --- a/lib/mix/tasks/ash_postgres.install.ex +++ b/lib/mix/tasks/ash_postgres.install.ex @@ -255,17 +255,20 @@ defmodule Mix.Tasks.AshPostgres.Install do repo, AshPostgres.Igniter.default_repo_contents(otp_app), fn zipper -> - zipper - |> set_otp_app(otp_app) - |> Sourceror.Zipper.top() - |> use_ash_postgres_instead_of_ecto() - |> Sourceror.Zipper.top() - |> remove_adapter_option() - |> Sourceror.Zipper.top() - |> configure_installed_extensions_function() - |> configure_min_pg_version_function() + {:ok, + zipper + |> set_otp_app(otp_app) + |> Sourceror.Zipper.top() + |> use_ash_postgres_instead_of_ecto() + |> Sourceror.Zipper.top() + |> remove_adapter_option()} end ) + |> Igniter.Code.Module.find_and_update_module!( + repo, + &configure_installed_extensions_function/1 + ) + |> Igniter.Code.Module.find_and_update_module!(repo, &configure_min_pg_version_function/1) end defp use_ash_postgres_instead_of_ecto(zipper) do