mirror of
https://github.com/snoyberg/keter.git
synced 2024-12-14 17:12:46 +03:00
Slightly better error message
This commit is contained in:
parent
30804ae341
commit
99739e3f84
@ -90,7 +90,11 @@ unpackBundle tf bundle appname = do
|
||||
let rest = do
|
||||
unpackTar dir $ Tar.read $ decompress lbs
|
||||
let configFP = dir F.</> "config" F.</> "keter.yaml"
|
||||
Just config <- decodeFile $ F.encodeString configFP
|
||||
mconfig <- decodeFile $ F.encodeString configFP
|
||||
config <-
|
||||
case mconfig of
|
||||
Just config -> return config
|
||||
Nothing -> throwIO InvalidConfigFile
|
||||
return (dir, config
|
||||
{ configStaticHosts = Set.fromList
|
||||
$ mapMaybe (fixStaticHost dir)
|
||||
|
@ -288,6 +288,7 @@ instance FromText Blaze.Builder where
|
||||
data KeterException = CannotParsePostgres F.FilePath
|
||||
| ExitCodeFailure F.FilePath ExitCode
|
||||
| NoPortsAvailable
|
||||
| InvalidConfigFile
|
||||
deriving (P.Show, Typeable)
|
||||
instance E.Exception KeterException
|
||||
|
||||
|
@ -59,7 +59,7 @@ run exec dir args env logger = do
|
||||
attach logger $ LogPipes pout perr
|
||||
log $ ProcessCreated exec
|
||||
return (Running pid, do
|
||||
liftIO $ waitForProcess pid `onException` killProcess pid
|
||||
_ <- liftIO $ waitForProcess pid `onException` killProcess pid
|
||||
loop (Just now))
|
||||
next
|
||||
forkKIO $ loop Nothing
|
||||
|
Loading…
Reference in New Issue
Block a user