@@ -27,7 +27,7 @@ import Distribution.PackageDescription
2727import Distribution.Simple.Utils
2828import Distribution.Version
2929
30- import Distribution.Client.Setup (CommonSetupFlags ( .. ), ConfigFlags ( .. ), GlobalFlags (.. ))
30+ import Distribution.Client.Setup (GlobalFlags (.. ))
3131
3232-- Project orchestration imports
3333
@@ -40,7 +40,6 @@ import Distribution.Client.ProjectOrchestration
4040import Distribution.Client.ScriptUtils
4141import Distribution.Client.TargetProblem
4242import Distribution.Simple.Command
43- import Distribution.Simple.Flag
4443import Distribution.Types.Component
4544import Distribution.Verbosity
4645
@@ -84,8 +83,7 @@ genBoundsCommand =
8483-- | The action for the @gen-bounds@ command when used in a project context.
8584genBoundsAction :: NixStyleFlags GenBoundsFlags -> [String ] -> GlobalFlags -> IO ()
8685genBoundsAction flags targetStrings globalFlags =
87- withContextAndSelectors RejectNoTargets Nothing flags targetStrings globalFlags OtherCommand $ \ targetCtx ctx targetSelectors -> do
88- let verbosity = fromFlagOrDefault normal (setupVerbosity $ configCommonFlags $ configFlags flags)
86+ withContextAndSelectors verbosity RejectNoTargets Nothing flags targetStrings globalFlags OtherCommand $ \ targetCtx ctx targetSelectors -> do
8987
9088 baseCtx <- case targetCtx of
9189 ProjectContext -> return ctx
@@ -155,6 +153,8 @@ genBoundsAction flags targetStrings globalFlags =
155153 notice verbosity boundsNeededMsg
156154 mapM_ (renderBoundsResult verbosity) boundsActions
157155 else notice verbosity " All bounds up-to-date"
156+ where
157+ verbosity = cfgVerbosity normal flags
158158
159159data GenBoundsResult = GenBoundsResult PackageIdentifier ComponentTarget (Maybe [PackageIdentifier ])
160160
0 commit comments