File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
cabal-install/src/Distribution/Client Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -199,10 +199,12 @@ updateRepo verbosity _updateFlags repoCtxt (repo, indexState) = do
199
199
-- NB: always update the timestamp, even if we didn't actually
200
200
-- download anything
201
201
writeIndexTimestamp index indexState
202
- ce <- if repoContextIgnoreExpiry repoCtxt
203
- then Just `fmap` getCurrentTime
204
- else return Nothing
205
- updated <- Sec. uncheckClientErrors $ Sec. checkForUpdates repoSecure ce
202
+ -- typically we get the current time to check expiry against
203
+ -- but if the flag is set, we don't.
204
+ now <- case repoContextIgnoreExpiry repoCtxt of
205
+ False -> Just <$> getCurrentTime
206
+ True -> pure Nothing
207
+ updated <- Sec. uncheckClientErrors $ Sec. checkForUpdates repoSecure now
206
208
-- this resolves indexState (which could be HEAD) into a timestamp
207
209
new_ts <- currentIndexTimestamp (lessVerbose verbosity) repoCtxt repo
208
210
let rname = remoteRepoName (repoRemote repo)
You can’t perform that action at this time.
0 commit comments