Skip to content

Commit

Permalink
Merge pull request #10542 from haskell/mergify/bp/3.14/pr-10506
Browse files Browse the repository at this point in the history
Backport #10506: Don't error if package index is missing (fix #10504)
  • Loading branch information
mergify[bot] authored Nov 10, 2024
2 parents 1f5b191 + 93baa67 commit 9b26613
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cabal-install/src/Distribution/Client/IndexUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ readRepoIndex verbosity repoCtxt repo idxState =
if isDoesNotExistError e
then do
case repo of
RepoRemote{..} -> dieWithException verbosity $ MissingPackageList repoRemote
RepoSecure{..} -> dieWithException verbosity $ MissingPackageList repoRemote
RepoRemote{..} -> warn verbosity $ exceptionMessageCabalInstall $ MissingPackageList repoRemote
RepoSecure{..} -> warn verbosity $ exceptionMessageCabalInstall $ MissingPackageList repoRemote
RepoLocalNoIndex local _ ->
warn verbosity $
"Error during construction of local+noindex "
Expand Down
6 changes: 4 additions & 2 deletions cabal-testsuite/PackageTests/Get/T7248/cabal.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# cabal get
Warning: <ROOT>/cabal.config: Unrecognized stanza on line 3
Error: [Cabal-7160]
The package list for 'repo.invalid' does not exist. Run 'cabal update' to download it.
Warning: The package list for 'repo.invalid' does not exist. Run 'cabal update' to download it.
Error: [Cabal-7100]
There is no package named 'a-b-s-e-n-t'.
You may need to run 'cabal update' to get the latest list of available packages.

0 comments on commit 9b26613

Please sign in to comment.