Skip to content

Commit

Permalink
Rearranged collect error to only show when not force updating
Browse files Browse the repository at this point in the history
  • Loading branch information
davidallendj committed Aug 21, 2024
1 parent 989ec61 commit 2e036c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ func CollectInventory(assets *[]RemoteAsset, params *CollectParams) error {
if smdClient.URI != "" {
err = smdClient.Add(body, headers)
if err != nil {
log.Error().Err(err).Msgf("failed to add Redfish endpoint")

// try updating instead
if params.ForceUpdate {
Expand All @@ -159,6 +158,8 @@ func CollectInventory(assets *[]RemoteAsset, params *CollectParams) error {
if err != nil {
log.Error().Err(err).Msgf("failed to forcibly update Redfish endpoint")
}
} else {
log.Error().Err(err).Msgf("failed to add Redfish endpoint")
}
}
} else {
Expand Down

0 comments on commit 2e036c5

Please sign in to comment.