on master help sign in
Run ./hakyll clean instead of just removing _cache
commit178609cfd0c30f10f86d72b3938ea50733b46222 authorJasper Van der Jeugt <m@jaspervdj.be> dateThu 30 Aug 2012, 09:36 (14 years ago) parent5f52c73
1 file changed+6−3
src/Hakyll/Core/Compiler.hs+6−3
src/Hakyll/Core/Compiler.hs+6−3
@@ -124,6 +124,7 @@ import Control.Monad.Trans (liftIO)
124124import Control.Monad.Error (throwError)
125125import Control.Category (Category, (.), id)
126126import Data.List (find)
127+import System.Environment (getProgName)
127128import System.FilePath (takeExtension)
128129
129130import Data.Binary (Binary)
@@ -305,6 +306,7 @@ cached name (Compiler d j) = Compiler d $ const $ CompilerM $ do
305306 identifier <- castIdentifier . compilerIdentifier <$> ask
306307 store <- compilerStore <$> ask
307308 modified <- compilerResourceModified <$> ask
309+ progName <- liftIO getProgName
308310 report logger $ "Checking cache: " ++ if modified then "modified" else "OK"
309311 if modified
310312 then do v <- unCompilerM $ j $ fromIdentifier identifier
@@ -312,10 +314,11 @@ cached name (Compiler d j) = Compiler d $ const $ CompilerM $ do
312314 return v
313315 else do v <- liftIO $ storeGet store name identifier
314316 case v of Found v' -> return v'
315− _ -> throwError error'
317+ _ -> throwError (error' progName)
316318 where
317− error' = "Hakyll.Core.Compiler.cached: Cache corrupt!"
318− ++ " Try deleting the _cache folder."
319+ error' progName =
320+ "Hakyll.Core.Compiler.cached: Cache corrupt! " ++
321+ "Try running: " ++ progName ++ " clean"
319322
320323-- | Create an unsafe compiler from a function in IO
321324--