Permalink
Browse files

Merge branch '2.2.x'

  • Loading branch information...
2 parents ffcfae7 + e4b1779 commit 04ffa02d6449e26d649e5f21623491a05a6e2a3d @jeffbrown jeffbrown committed Nov 19, 2012
@@ -113,13 +113,9 @@ class InteractiveMode {
error "You cannot uninstall a plugin in interactive mode."
}
else if ("quit".equals(trimmed)) {
- goodbye()
+ quit()
} else if('stop-app'.equals(trimmed)) {
- if(settings.forkSettings?.get('run')) {
- parseAndExecute 'stop-app'
- } else {
- stopApp()
- }
+ stopApp()
} else if ("exit".equals(trimmed)) {
exit()
}
@@ -175,32 +171,36 @@ class InteractiveMode {
System.setProperty(Environment.INTERACTIVE_MODE_ENABLED, "true")
}
+ protected void quit() {
+ exit true
+ }
+
protected void goodbye() {
updateStatus "Goodbye"
System.exit(0)
}
protected void stopApp() {
- if (grailsServer) {
- try {
- updateStatus "Stopping Grails server"
- grailsServer.stop()
- } catch (e) {
- error "Error stopping server: $e.message", e
- }
- finally {
- grailsServer = null
- }
+ if(settings.forkSettings?.get('run')) {
+ parseAndExecute 'stop-app'
+ } else if (grailsServer) {
+ try {
+ updateStatus "Stopping Grails server"
+ grailsServer.stop()
+ } catch (e) {
+ error "Error stopping server: $e.message", e
+ }
+ finally {
+ grailsServer = null
+ }
}
}
- protected void exit() {
- if (grailsServer) {
+ protected void exit(boolean shouldStopApp = false) {
+ if(shouldStopApp) {
stopApp()
}
- else {
- goodbye()
- }
+ goodbye()
}
protected void open(String scriptName) {

0 comments on commit 04ffa02

Please sign in to comment.