Skip to content
Snippets Groups Projects
Commit d58a75ef authored by Rebecca Turner's avatar Rebecca Turner Committed by Mikolaj
Browse files

Don't error if package index is missing (fix #10504)

All of the packages Cabal needs may already be present in the local
package database; we don't know yet!

This is a partial revert of #8944.

See: https://github.com/haskell/cabal/pull/8944#issuecomment-2313147439
parent c1ddadbd
No related branches found
No related tags found
No related merge requests found
......@@ -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 "
......
# 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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment