Commit 7e89c782 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Fix combination of --global --package-db when compiling Setup.hs scripts

The order of the package db stack is important.
parent 2bc79114
......@@ -244,7 +244,10 @@ installWithPlanner planner verbosity packageDBs repos comp conf
-- install. However we also allow looking in a specific package db.
usePackageDB = if UserPackageDB `elem` packageDBs
then packageDBs
else packageDBs ++ [UserPackageDB],
else let (db@GlobalPackageDB:dbs) = packageDBs
in db : UserPackageDB : dbs,
--TODO: use Ord instance:
-- insert UserPackageDB packageDBs
usePackageIndex = if UserPackageDB `elem` packageDBs
then index
else Nothing,
......
Markdown is supported
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