web: don't run tests when just creating support files

This commit is contained in:
Simon Michael 2011-06-14 19:48:52 +00:00
parent 2bdeb2bf6e
commit 2d3ac6f032

View File

@ -68,14 +68,14 @@ main = do
-- | The web command. -- | The web command.
web :: [Opt] -> [String] -> Journal -> IO () web :: [Opt] -> [String] -> Journal -> IO ()
web opts args j = do web opts args j = do
putStrLn $ "Running self-tests..."
runTestsOrExit opts args
created <- createFilesIfMissing created <- createFilesIfMissing
if created if created
then do then do
putStrLn $ "Installing support files in "++datadir++" - done, please run again." putStrLn $ "Installing support files in "++datadir++" - done, please run again."
exitFailure exitFailure
else do else do
putStrLn $ "Running self-tests..."
runTestsOrExit opts args
putStrLn $ "Using support files in "++datadir putStrLn $ "Using support files in "++datadir
let host = defhost let host = defhost
port = fromMaybe defport $ portFromOpts opts port = fromMaybe defport $ portFromOpts opts