Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

GRAILS-9535 - make stop-app work in interactive mode

There is still an issue with the "exit" command when running in forked mode.  This isn't mentioned in the JIRA but it doesn't work.  That is really a separate issue.
  • Loading branch information...
commit 21c51444f1c8c9a7224991d6adaed14b2ede06a5 1 parent e23211b
@jeffbrown jeffbrown authored
View
17 ...otstrap/src/main/groovy/org/codehaus/groovy/grails/cli/interactive/InteractiveMode.groovy
@@ -114,8 +114,13 @@ class InteractiveMode {
}
else if ("quit".equals(trimmed)) {
goodbye()
- }
- else if (("exit".equals(trimmed)) || ("stop-app".equals(trimmed))) {
+ } else if('stop-app'.equals(trimmed)) {
+ if(settings.forkSettings?.get('run')) {
+ parseAndExecute 'stop-app'
+ } else {
+ stopApp()
+ }
+ } else if ("exit".equals(trimmed)) {
exit()
}
else if (scriptName.startsWith("open ")) {
@@ -175,7 +180,7 @@ class InteractiveMode {
System.exit(0)
}
- protected void exit() {
+ protected void stopApp() {
if (grailsServer) {
try {
updateStatus "Stopping Grails server"
@@ -187,6 +192,12 @@ class InteractiveMode {
grailsServer = null
}
}
+ }
+
+ protected void exit() {
+ if (grailsServer) {
+ stopApp()
+ }
else {
goodbye()
}
Please sign in to comment.
Something went wrong with that request. Please try again.