From 698170143d5a86cf13a1ff7816439eb90a1e4c99 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Thu, 14 Feb 2019 00:01:31 +0100 Subject: Fix empty package-db being interpreted as "existing" --- src/CabalHelper/Compiletime/Program/GHC.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/CabalHelper/Compiletime/Program/GHC.hs b/src/CabalHelper/Compiletime/Program/GHC.hs index 97b04ed..644c6ec 100644 --- a/src/CabalHelper/Compiletime/Program/GHC.hs +++ b/src/CabalHelper/Compiletime/Program/GHC.hs @@ -124,6 +124,7 @@ cabalVersionExistsInPkgDb cabalVer db@(PackageDbDir db_path) = do return $ case (cabalVer, vers) of (CabalVersion ver, _) -> ver `elem` vers + (CabalHEAD _, []) -> False (CabalHEAD _, [_headver]) -> True (CabalHEAD _, _) -> error $ msg ++ db_path) -- cgit v1.2.3