diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-10 17:22:32 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-10 17:23:43 -0400 |
| commit | 25942fb0cca0ca90933026bf959506e099ff95a4 (patch) | |
| tree | 2f84378c71abaa4458c5078e8cb8e6726bffbefd /Propellor/Property/File.hs | |
| parent | 5acaf8758f752574140dd79de7996d91a81d1cd4 (diff) | |
Propellor monad is a Reader for HostAttr
So far, the hostname is only used to improve a message in withPrivData,
but I anticipate using HostAttr for a lot more.
Diffstat (limited to 'Propellor/Property/File.hs')
| -rw-r--r-- | Propellor/Property/File.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Propellor/Property/File.hs b/Propellor/Property/File.hs index 64dce66f..10dee75e 100644 --- a/Propellor/Property/File.hs +++ b/Propellor/Property/File.hs @@ -38,10 +38,10 @@ notPresent f = check (doesFileExist f) $ Property (f ++ " not present") $ makeChange $ nukeFile f fileProperty :: Desc -> ([Line] -> [Line]) -> FilePath -> Property -fileProperty desc a f = Property desc $ go =<< doesFileExist f +fileProperty desc a f = Property desc $ go =<< liftIO (doesFileExist f) where go True = do - ls <- lines <$> readFile f + ls <- liftIO $ lines <$> readFile f let ls' = a ls if ls' == ls then noChange |
