Skip to content

Commit

Permalink
Bugfix - Panic in Dotnet and NuGet commands (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
yahavi authored Mar 18, 2022
1 parent 69a0ae3 commit 8fd4a72
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions artifactory/utils/dotnet/solution/solution.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ func (solution *solution) BuildInfo(moduleName string) (*buildinfo.BuildInfo, er

// Populate requestedBy field
for _, directDepName := range directDeps {
directDep := dependencies[directDepName]
directDep.RequestedBy = [][]string{{module.Id}}
populateRequestedBy(*directDep, dependencies, childrenMap)
// Populate the direct dependency requested by only if the dependency exist in the cache
if directDep, exist := dependencies[directDepName]; exist {
directDep.RequestedBy = [][]string{{module.Id}}
populateRequestedBy(*directDep, dependencies, childrenMap)
}
}

// Populate module dependencies
Expand Down

0 comments on commit 8fd4a72

Please sign in to comment.