Skip to content

Commit

Permalink
APIGOV-27284 - fix sonar warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dfeldick committed Feb 16, 2024
1 parent b37026f commit 826af2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/traceability/main/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ func main() {
os.Setenv("AGENTFEATURES_VERSIONCHECKER", "false")

// use the pod name as the agent name
pod_name := os.Getenv("POD_NAME")
if pod_name != "" {
os.Setenv("CENTRAL_AGENTNAME", pod_name)
podName := os.Getenv("POD_NAME")
if podName != "" {
os.Setenv("CENTRAL_AGENTNAME", podName)
}

if err := traceability.TraceCmd.Execute(); err != nil {
Expand Down

0 comments on commit 826af2d

Please sign in to comment.