From ec03515ab9fa50ae540429898bb99075358e92ed Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 30 Oct 2024 11:38:53 -0400 Subject: [PATCH] Do not reload rake tasks when under add-on environment Co-authored-by: Andy Waite --- lib/tapioca/dsl/pipeline.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tapioca/dsl/pipeline.rb b/lib/tapioca/dsl/pipeline.rb index 90360a0ef..1085cbe2b 100644 --- a/lib/tapioca/dsl/pipeline.rb +++ b/lib/tapioca/dsl/pipeline.rb @@ -227,7 +227,8 @@ def report_error(error) def abort_if_pending_migrations! return unless defined?(::Rake) - Rails.application.load_tasks + Rails.application.load_tasks unless @lsp_addon + if Rake::Task.task_defined?("db:abort_if_pending_migrations") Rake::Task["db:abort_if_pending_migrations"].invoke end