Skip to content

Commit e63ac8b

Browse files
committed
don't print anything when provenance is empty
1 parent 3135148 commit e63ac8b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cabal-install/src/Distribution/Client/ProjectPlanning.hs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,13 @@ rebuildProjectConfig
398398
localPackages <- phaseReadLocalPackages (projectConfig <> cliConfig)
399399
return (projectConfig, localPackages)
400400

401-
notice (verboseStderr verbosity) . render . vcat $
402-
text "Configuration is affected by the following files:"
403-
: [ text "-" <+> docProjectConfigPath path
404-
| Explicit path <- Set.toList . (if verbosity >= verbose then id else onlyTopLevelProvenance) $ projectConfigProvenance projectConfig
405-
]
401+
let configfiles =
402+
[ text "-" <+> docProjectConfigPath path
403+
| Explicit path <- Set.toList . (if verbosity >= verbose then id else onlyTopLevelProvenance) $ projectConfigProvenance projectConfig
404+
]
405+
unless (null configfiles) $
406+
notice (verboseStderr verbosity) . render . vcat $
407+
text "Configuration is affected by the following files:" : configfiles
406408

407409
return (projectConfig <> cliConfig, localPackages)
408410
where

0 commit comments

Comments
 (0)