Skip to content

Commit

Permalink
Ensure external indexes are added to indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
felixjung authored and daveshanley committed Oct 29, 2024
1 parent 84ee059 commit a165dcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index/rolodex.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ func (r *Rolodex) SetRootNode(node *yaml.Node) {

func (r *Rolodex) AddExternalIndex(idx *SpecIndex, location string) {
r.indexLock.Lock()
r.indexes = append(r.indexes, idx)
if r.indexMap[location] == nil {
r.indexMap[location] = idx
}
r.indexLock.Unlock()
}

func (r *Rolodex) AddIndex(idx *SpecIndex) {
r.indexes = append(r.indexes, idx)
if idx != nil {
p := idx.specAbsolutePath
r.AddExternalIndex(idx, p)
Expand Down

0 comments on commit a165dcd

Please sign in to comment.