Skip to content

Commit

Permalink
GRAILS-9535 - make stop-app work in interactive mode
Browse files Browse the repository at this point in the history
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
Jeff Brown committed Nov 18, 2012
1 parent e23211b commit 21c5144
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ")) {
Expand Down Expand Up @@ -175,7 +180,7 @@ class InteractiveMode {
System.exit(0)
}

protected void exit() {
protected void stopApp() {
if (grailsServer) {
try {
updateStatus "Stopping Grails server"
Expand All @@ -187,6 +192,12 @@ class InteractiveMode {
grailsServer = null
}
}
}

protected void exit() {
if (grailsServer) {
stopApp()
}
else {
goodbye()
}
Expand Down

0 comments on commit 21c5144

Please sign in to comment.