Commit 26eb1c31 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

cabal-install/IndexUtils : Fix display of age now that its days as a Double.

parent 7517b5eb
...@@ -82,6 +82,7 @@ import System.FilePath.Posix as FilePath.Posix ...@@ -82,6 +82,7 @@ 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
...@@ -219,7 +220,7 @@ readRepoIndex verbosity repo mode = ...@@ -219,7 +220,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 " ++ show dt ++ " days old.\nRun " ++ "' is " ++ showFFloat (Just 1) dt " 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