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
|
||||
|
||||
* 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
|
||||
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
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user