Skip to content

Commit

Permalink
Provide slightly more information when there are multiple packages
Browse files Browse the repository at this point in the history
Partially addresses haskell#6197
  • Loading branch information
tomjaguarpaw authored and hololeap committed Apr 24, 2022
1 parent b04450c commit 9a23844
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cabal-install/src/Distribution/Client/ProjectOrchestration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,9 @@ resolveTargets selectPackageTargets selectComponentTarget
| otherwise
= Left (TargetProblemNoSuchPackage pkgid)

checkTarget (TargetPackage _ _ _)
= error "TODO: add support for multiple packages in a directory"
checkTarget (TargetPackage _ pkgids _)
= error ("TODO: add support for multiple packages in a directory. Got\n"
++ unlines (map prettyShow pkgids))
-- For the moment this error cannot happen here, because it gets
-- detected when the package config is being constructed. This case
-- will need handling properly when we do add support.
Expand Down

0 comments on commit 9a23844

Please sign in to comment.