Skip to content

Commit d1c56ef

Browse files
committed
Update 'and other versions' message
1 parent 38279aa commit d1c56ef

File tree

2 files changed

+2
-2
lines changed
  • cabal-install-solver/src/Distribution/Solver/Modular
  • cabal-install/tests/UnitTests/Distribution/Solver/Modular

2 files changed

+2
-2
lines changed

cabal-install-solver/src/Distribution/Solver/Modular/Message.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ showOptions verb q xs = showQPN q ++ "; " ++ (L.intercalate ", "
292292
then showOption q x
293293
else showI i -- Don't show the package, just the version
294294
| x@(POption i linkedTo) <- if verb >= verbose then xs else take 1 xs
295-
] ++ if verb < verbose && length xs >= 1 then " and other versions" else "")
295+
] ++ if verb < verbose && length xs > 1 then " and " ++ show (length xs - 1) ++" other versions" else "")
296296

297297
showGR :: QGoalReason -> String
298298
showGR UserGoal = " (user goal)"

cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ tests =
974974
, Right $ exAv "B" 1 [ExFix "A" 4]
975975
]
976976
rejecting = "rejecting: A-3.0.0 (conflict: B => A==4.0.0)"
977-
skipping = "skipping: A; 2.0.0 and other versions (has"
977+
skipping = "skipping: A; 2.0.0 and 1 other versions (has"
978978
in mkTest db "show summarized skipping versions list" ["B"] $
979979
solverFailure (\msg -> rejecting `isInfixOf` msg && skipping `isInfixOf` msg)
980980
]

0 commit comments

Comments
 (0)