diff --git a/grails-console/src/main/groovy/grails/ui/shell/GrailsShell.groovy b/grails-console/src/main/groovy/grails/ui/shell/GrailsShell.groovy index 25a637a4b9..e9f275eae5 100644 --- a/grails-console/src/main/groovy/grails/ui/shell/GrailsShell.groovy +++ b/grails-console/src/main/groovy/grails/ui/shell/GrailsShell.groovy @@ -116,13 +116,13 @@ class GrailsShell extends Grails { @Override Object execute(String line) { - if (beforeExecution) { + if (!isExecutable(line) && beforeExecution) { beforeExecution() } Object result = super.execute(line) - if (afterExecution) { + if (!isExecutable(line) && afterExecution) { afterExecution() }