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