This is an automated email from the ASF dual-hosted git repository.

jamesfredley pushed a commit to branch fix-wrapper-breaking-change
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 6fd0f073865854fd12de861ccc34958c15a7726f
Author: James Fredley <[email protected]>
AuthorDate: Tue Aug 26 16:08:00 2025 -0400

    Fix ClosureCompleter initialization in GradleCommand
    
    Wrap the call to readTasks in a closure when initializing ClosureCompleter 
to ensure tasks are read dynamically. This prevents premature evaluation and 
potential stale task lists.
---
 .../src/main/groovy/org/grails/cli/gradle/commands/GradleCommand.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/grails-shell-cli/src/main/groovy/org/grails/cli/gradle/commands/GradleCommand.groovy
 
b/grails-shell-cli/src/main/groovy/org/grails/cli/gradle/commands/GradleCommand.groovy
index 58c665bdac..c0773ae574 100644
--- 
a/grails-shell-cli/src/main/groovy/org/grails/cli/gradle/commands/GradleCommand.groovy
+++ 
b/grails-shell-cli/src/main/groovy/org/grails/cli/gradle/commands/GradleCommand.groovy
@@ -77,7 +77,7 @@ class GradleCommand implements ProjectCommand, Completer, 
ProjectContextAware {
     private void initializeCompleter() {
         if (completer == null && projectContext) {
             readTasks = new ReadGradleTasks(projectContext)
-            completer = new ClosureCompleter((Closure<Collection<String>>) 
readTasks.call())
+            completer = new ClosureCompleter((Closure<Collection<String>>) { 
readTasks.call() })
         }
     }
 

Reply via email to