Commit 43ac1208 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Use whole days in the warning about out of date package index

Say 16 days, rather than 16.3 days. The precision is quite unnecessary.
parent 732a6a78
...@@ -86,7 +86,6 @@ import System.FilePath.Posix as FilePath.Posix ...@@ -86,7 +86,6 @@ import System.FilePath.Posix as FilePath.Posix
import System.IO import System.IO
import System.IO.Unsafe (unsafeInterleaveIO) import System.IO.Unsafe (unsafeInterleaveIO)
import System.IO.Error (isDoesNotExistError) import System.IO.Error (isDoesNotExistError)
import Numeric (showFFloat)
getInstalledPackages :: Verbosity -> Compiler getInstalledPackages :: Verbosity -> Compiler
...@@ -223,7 +222,7 @@ readRepoIndex verbosity repo mode = ...@@ -223,7 +222,7 @@ readRepoIndex verbosity repo mode =
when (dt >= isOldThreshold) $ case repoKind repo of when (dt >= isOldThreshold) $ case repoKind repo of
Left remoteRepo -> warn verbosity $ Left remoteRepo -> warn verbosity $
"The package list for '" ++ remoteRepoName remoteRepo "The package list for '" ++ remoteRepoName remoteRepo
++ "' is " ++ showFFloat (Just 1) dt " days old.\nRun " ++ "' is " ++ shows (floor dt :: Int) " days old.\nRun "
++ "'cabal update' to get the latest list of available packages." ++ "'cabal update' to get the latest list of available packages."
Right _localRepo -> return () Right _localRepo -> return ()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment