Skip to content

Commit 34ecae1

Browse files
committed
Don't use local/snap unknown installed packages #292
1 parent 1094c25 commit 34ecae1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Stack/Build/Installed.hs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,15 @@ isAllowed mpcache sourceMap mloc dp
172172
where
173173
toInclude =
174174
case Map.lookup name sourceMap of
175-
-- The sourceMap has nothing to say about this package, so we can use it
176-
Nothing -> True
175+
Nothing ->
176+
case mloc of
177+
-- The sourceMap has nothing to say about this global
178+
-- package, so we can use it
179+
Nothing -> True
180+
-- For non-global packages, don't include unknown packages.
181+
-- See:
182+
-- https://github.com/commercialhaskell/stack/issues/292
183+
Just _ -> False
177184

178185
Just pii ->
179186
version == piiVersion pii -- only accept the desired version

0 commit comments

Comments
 (0)