diff --git a/src/poetry/repositories/pool.py b/src/poetry/repositories/pool.py index 0e68cc6997b..49f0c18adb7 100644 --- a/src/poetry/repositories/pool.py +++ b/src/poetry/repositories/pool.py @@ -62,6 +62,8 @@ def add_repository( Adds a repository to the pool. """ repository_name = repository.name.lower() + if repository_name in self._lookup: + raise RuntimeError(f"{repository_name} already in pool") if default: if self.has_default():