Hi
I'm trying to stop an external process (namely `grunt watch`) when `playOnStopped` happens.
(`playOnStopped` is when the `run` task ends, right? That is, when I hit CTRL+D and the application shuts down.)
However, the code that I've registered with `playOnStopped` never runs.
`playOnStarted` works fine however.
Have a look at these SBT settings:
playOnStarted <+= baseDirectory { root =>
(serverAddress: jn.InetSocketAddress) => println("playOnStarted called") // <-- is printed, works fine
},
playOnStopped <+= baseDirectory { root =>
() => println("playOnStopped called") // <-- never printed, is `playOnStopped` broken?
},
(Here is another thread that suggests that the above code ought to work:
What happens when I hit CTRL+D and my Play application server shuts down, is that many
"JNotifyException_linux: Error removing watch 203"
Could it be that the JNotifyException_linux errors somehow prevents `playOnStopped` from being called?
Or am I doing something wrong, or is there a bug?
(Background: I'm transpiling LiveScript to Javascript and minifying and bundling JS and CSS using Node.js' Grunt.)
Best regards,
KajMagnus