Have to type quit to quit

This commit is contained in:
Michael Snoyman 2015-07-20 01:29:46 +03:00
parent 9cb48dfa7a
commit 46fbb1a615
3 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,7 @@
## 1.4.12
* Devel server: have to type quit to quit
## 1.4.11
* Add support to `yesod devel` to detect and use `GHC_PACKAGE_PATH`. This makes

View File

@ -238,10 +238,18 @@ devel opts passThroughArgs = withSocketsDo $ withManager $ \manager -> do
let (terminator, after) = case terminateWith opts of
TerminateOnEnter ->
("Press ENTER", void getLine)
("Type 'quit'", blockQuit)
TerminateOnlyInterrupt -> -- run for one year
("Interrupt", threadDelay $ 1000 * 1000 * 60 * 60 * 24 * 365)
blockQuit = do
s <- getLine
if s == "quit"
then return ()
else do
putStrLn "Type 'quit' to quit"
blockQuit
putStrLn $ "Yesod devel server. " ++ terminator ++ " to quit"
void $ forkIO $ do

View File

@ -1,5 +1,5 @@
name: yesod-bin
version: 1.4.11
version: 1.4.12
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>