Fix rather humongous bug in 'ghcup list'

This commit is contained in:
Julian Ospald 2022-03-17 20:04:59 +01:00
parent f9a38e616d
commit 0c70feb09c
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F

View File

@ -143,7 +143,7 @@ printListResult no_color raw lr = do
)
$ lr
let cols =
foldr (\xs ys -> zipWith (:) xs ys) (replicate (length rows) []) rows
foldr (\xs ys -> zipWith (:) xs ys) (cycle [[]]) rows
lengths = fmap (maximum . fmap strWidth) cols
padded = fmap (\xs -> zipWith padTo xs lengths) rows