File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -477,15 +477,21 @@ checkBundleResolver initOpts snapshotLoc snapCandidate pkgDirs = do
477
477
getRecommendedSnapshots :: Snapshots -> NonEmpty SnapName
478
478
getRecommendedSnapshots snapshots =
479
479
-- in order - Latest LTS, Latest Nightly, all LTS most recent first
480
- case NonEmpty. nonEmpty ltss of
480
+ case NonEmpty. nonEmpty supportedLtss of
481
481
Just (mostRecent :| older)
482
482
-> mostRecent :| (nightly : older)
483
483
Nothing
484
484
-> nightly :| []
485
485
where
486
486
ltss = map (uncurry LTS ) (IntMap. toDescList $ snapshotsLts snapshots)
487
+ supportedLtss = filter (>= minSupportedLts) ltss
487
488
nightly = Nightly (snapshotsNightly snapshots)
488
489
490
+ -- | Yields the minimum LTS supported by stack.
491
+ minSupportedLts :: SnapName
492
+ minSupportedLts = LTS 3 0 -- See https://github.com/commercialhaskell/stack/blob/master/ChangeLog.md
493
+ -- under stack version 2.1.1.
494
+
489
495
data InitOpts = InitOpts
490
496
{ searchDirs :: ! [T. Text ]
491
497
-- ^ List of sub directories to search for .cabal files
You can’t perform that action at this time.
0 commit comments