diff --git a/cabal-validate/src/Cli.hs b/cabal-validate/src/Cli.hs index fed3661a937..ef01d907594 100644 --- a/cabal-validate/src/Cli.hs +++ b/cabal-validate/src/Cli.hs @@ -204,10 +204,13 @@ resolveOpts opts = do , "Cabal-QuickCheck" , "Cabal-tree-diff" , "Cabal-described" - , "cabal-install" - , "cabal-install-solver" - , "cabal-benchmarks" ] + , optionals + (not (rawLibOnly opts)) + [ "cabal-install" + , "cabal-install-solver" + , "cabal-benchmarks" + ] , optionals (rawSolverBenchmarks opts) [ "solver-benchmarks"