Skip to content

Commit 93baa67

Browse files
9999yearsmergify[bot]
authored andcommitted
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: #8944 (comment) (cherry picked from commit d58a75e)
1 parent 1f5b191 commit 93baa67

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

cabal-install/src/Distribution/Client/IndexUtils.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ readRepoIndex verbosity repoCtxt repo idxState =
457457
if isDoesNotExistError e
458458
then do
459459
case repo of
460-
RepoRemote{..} -> dieWithException verbosity $ MissingPackageList repoRemote
461-
RepoSecure{..} -> dieWithException verbosity $ MissingPackageList repoRemote
460+
RepoRemote{..} -> warn verbosity $ exceptionMessageCabalInstall $ MissingPackageList repoRemote
461+
RepoSecure{..} -> warn verbosity $ exceptionMessageCabalInstall $ MissingPackageList repoRemote
462462
RepoLocalNoIndex local _ ->
463463
warn verbosity $
464464
"Error during construction of local+noindex "
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# cabal get
22
Warning: <ROOT>/cabal.config: Unrecognized stanza on line 3
3-
Error: [Cabal-7160]
4-
The package list for 'repo.invalid' does not exist. Run 'cabal update' to download it.
3+
Warning: The package list for 'repo.invalid' does not exist. Run 'cabal update' to download it.
4+
Error: [Cabal-7100]
5+
There is no package named 'a-b-s-e-n-t'.
6+
You may need to run 'cabal update' to get the latest list of available packages.

0 commit comments

Comments
 (0)