Skip to content

Commit

Permalink
🐛 do not reset named asset to empty name (#3891)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeffrey authored May 7, 2024
1 parent d132fe7 commit 550dcda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion providers/os/provider/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ func (s *Service) detect(asset *inventory.Asset, conn shared.Connection) error {
log.Debug().Msg("run cloud platform detector")
if id, name, related := aws.Detect(conn, asset.Platform); id != "" {
asset.PlatformIds = append(asset.PlatformIds, id)
asset.Name = name
if name != "" {
// if we weren't able to detect a name for this asset, don't update to an empty value
asset.Name = name
}
asset.RelatedAssets = append(asset.RelatedAssets, relatedIds2assets(related)...)
}

Expand Down

0 comments on commit 550dcda

Please sign in to comment.