If provided isn't a selector, it means we don't have to return a range

Add also more tests about provides
This commit is contained in:
Ettore Di Giacinto
2020-12-16 22:17:13 +01:00
parent 921869d04c
commit ce169f49af
2 changed files with 140 additions and 17 deletions

View File

@@ -330,6 +330,9 @@ func (db *InMemoryDatabase) FindPackages(p Package) (Packages, error) {
// Provides: Treat as the replaced package here
if provided, err := db.getProvide(p); err == nil {
p = provided
if !provided.IsSelector() {
return Packages{provided}, nil
}
}
db.Lock()