Skip to content

Commit fd6d981

Browse files
committed
Fix for #9388 - stop-app command in interactive mode
1 parent ea49f0b commit fd6d981

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

grails-bootstrap/src/main/groovy/org/grails/io/support/MainClassFinder.groovy

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package org.grails.io.support
22

33
import grails.util.BuildSettings
44
import groovy.transform.CompileStatic
5+
import groovy.transform.Memoized
56
import groovyjarjarasm.asm.ClassReader
67
import groovyjarjarasm.asm.ClassVisitor
78
import groovyjarjarasm.asm.MethodVisitor
@@ -83,7 +84,10 @@ class MainClassFinder {
8384

8485
static String findMainClass(File rootFolder = BuildSettings.CLASSES_DIR) {
8586
if(mainClassName) return mainClassName
86-
87+
if( rootFolder == null) {
88+
// try current directory
89+
rootFolder = new File("build/classes/main")
90+
}
8791
if (!rootFolder.exists()) {
8892
return null // nothing to do
8993
}

0 commit comments

Comments
 (0)