Skip to content

Commit

Permalink
Stop if cannot attain requested index-state, haskell#8076.
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed May 16, 2022
1 parent b0be29a commit 83500c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cabal-install/src/Distribution/Client/IndexUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,11 @@ getSourcePackagesAtIndexState verbosity repoCtxt mb_idxState mb_activeRepos = do
IndexStateTime ts0 -> do
when (isiMaxTime isi /= ts0) $
if ts0 > isiMaxTime isi
then warn verbosity $
"Requested index-state " ++ prettyShow ts0
++ " is newer than '" ++ unRepoName rname ++ "'!"
++ " Falling back to older state ("
++ prettyShow (isiMaxTime isi) ++ ")."
then die' verbosity $
"Stopping this command as the requested index-state=" ++ prettyShow ts0
++ " is newer than (" ++ prettyShow (isiMaxTime isi)
++ "), the most recent state of '" ++ unRepoName rname
++ "'. You could try 'cabal update' to bring down a later state or request an earlier timestamp for index-state."
else info verbosity $
"Requested index-state " ++ prettyShow ts0
++ " does not exist in '"++ unRepoName rname ++"'!"
Expand Down

0 comments on commit 83500c4

Please sign in to comment.