Skip to content

Commit b3c7982

Browse files
authored
Merge pull request #6436 from phadej/issue-6013
Resolve #6013: Warn if packages and optional-packages are both empty
2 parents 65522af + 4e6128b commit b3c7982

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cabal-install/Distribution/Client/ProjectOrchestration.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ establishProjectBaseContext verbosity cliConfig currentCommand = do
222222
verbosity cabalDirLayout
223223
projectConfig
224224

225+
-- https://github.com/haskell/cabal/issues/6013
226+
when (null (projectPackages projectConfig) && null (projectPackagesOptional projectConfig)) $
227+
warn verbosity "There are no packages or optional-packages in the project"
228+
225229
return ProjectBaseContext {
226230
distDirLayout,
227231
cabalDirLayout,

0 commit comments

Comments
 (0)