Have to type quit to quit
This commit is contained in:
parent
9cb48dfa7a
commit
46fbb1a615
@ -1,3 +1,7 @@
|
|||||||
|
## 1.4.12
|
||||||
|
|
||||||
|
* Devel server: have to type quit to quit
|
||||||
|
|
||||||
## 1.4.11
|
## 1.4.11
|
||||||
|
|
||||||
* Add support to `yesod devel` to detect and use `GHC_PACKAGE_PATH`. This makes
|
* Add support to `yesod devel` to detect and use `GHC_PACKAGE_PATH`. This makes
|
||||||
|
|||||||
@ -238,10 +238,18 @@ devel opts passThroughArgs = withSocketsDo $ withManager $ \manager -> do
|
|||||||
|
|
||||||
let (terminator, after) = case terminateWith opts of
|
let (terminator, after) = case terminateWith opts of
|
||||||
TerminateOnEnter ->
|
TerminateOnEnter ->
|
||||||
("Press ENTER", void getLine)
|
("Type 'quit'", blockQuit)
|
||||||
TerminateOnlyInterrupt -> -- run for one year
|
TerminateOnlyInterrupt -> -- run for one year
|
||||||
("Interrupt", threadDelay $ 1000 * 1000 * 60 * 60 * 24 * 365)
|
("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"
|
putStrLn $ "Yesod devel server. " ++ terminator ++ " to quit"
|
||||||
void $ forkIO $ do
|
void $ forkIO $ do
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-bin
|
name: yesod-bin
|
||||||
version: 1.4.11
|
version: 1.4.12
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user