diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2018-10-27 21:05:49 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2018-10-27 21:05:49 +0200 |
commit | 6c53b98346f2dd3e97fcfe30919362245ffe9745 (patch) | |
tree | 1daeb3c5adeeae96ac06f3ab806295d5ea3bb708 /lib/Distribution | |
parent | 914d428ff1a1529b98206f9f3575c88ade7ea38b (diff) |
Fix getProjConfModTime: allow missing *.project.{local,freeze} files
Diffstat (limited to 'lib/Distribution')
-rw-r--r-- | lib/Distribution/Helper.hs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs index e98427e..97670de 100644 --- a/lib/Distribution/Helper.hs +++ b/lib/Distribution/Helper.hs @@ -196,12 +196,19 @@ getProjConfModTime ProjConfV1{pcV1CabalFile} = fmap ProjConfModTimes $ mapM getFileModTime [ pcV1CabalFile ] -getProjConfModTime ProjConfV2{..} = - fmap ProjConfModTimes $ mapM getFileModTime +getProjConfModTime ProjConfV2{..} = do + mandatory <- mapM getFileModTime $ [ pcV2CabalProjFile - , pcV2CabalProjLocalFile + ] + optional <- mapM (traverse getFileModTime <=< mightExist) + [ pcV2CabalProjLocalFile , pcV2CabalProjFreezeFile ] + return $ + ProjConfModTimes $ + mandatory ++ + catMaybes optional + getProjConfModTime ProjConfStack{..} = fmap ProjConfModTimes $ mapM getFileModTime [ pcStackYaml |