Fix GHCup showing up twice in list
This commit is contained in:
parent
b38a569124
commit
21d30cd8ce
24
lib/GHCup.hs
24
lib/GHCup.hs
@ -1187,18 +1187,18 @@ listVersions lt' criteria = do
|
|||||||
latestVer = fst <$> headOf (getTagged Latest) av
|
latestVer = fst <$> headOf (getTagged Latest) av
|
||||||
recommendedVer = fst <$> headOf (getTagged Latest) av
|
recommendedVer = fst <$> headOf (getTagged Latest) av
|
||||||
isOld = maybe True (> currentVer) latestVer && maybe True (> currentVer) recommendedVer
|
isOld = maybe True (> currentVer) latestVer && maybe True (> currentVer) recommendedVer
|
||||||
in if | currentVer == listVer -> Nothing
|
in if | Map.member currentVer av -> Nothing
|
||||||
| otherwise -> ListResult { lVer = currentVer
|
| otherwise -> Just $ ListResult { lVer = currentVer
|
||||||
, lTag = maybe (if isOld then [Old] else []) _viTags listVer
|
, lTag = maybe (if isOld then [Old] else []) _viTags listVer
|
||||||
, lCross = Nothing
|
, lCross = Nothing
|
||||||
, lTool = GHCup
|
, lTool = GHCup
|
||||||
, fromSrc = False
|
, fromSrc = False
|
||||||
, lStray = isNothing listVer
|
, lStray = isNothing listVer
|
||||||
, lSet = True
|
, lSet = True
|
||||||
, lInstalled = True
|
, lInstalled = True
|
||||||
, lNoBindist = False
|
, lNoBindist = False
|
||||||
, hlsPowered = False
|
, hlsPowered = False
|
||||||
}
|
}
|
||||||
|
|
||||||
-- NOTE: this are not cross ones, because no bindists
|
-- NOTE: this are not cross ones, because no bindists
|
||||||
toListResult :: ( MonadLogger m
|
toListResult :: ( MonadLogger m
|
||||||
|
Loading…
Reference in New Issue
Block a user