Skip to content

Commit

Permalink
Check error is not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
gjulianm committed Jan 30, 2025
1 parent 33f0588 commit 411d360
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/new-e2e/pkg/environments/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ func (e *Host) generateAndDownloadAgentFlare(outputDir string) (string, error) {
flareCommandOutput, err := e.Agent.Client.FlareWithError(agentclient.WithArgs([]string{"--email", "e2e-tests@datadog-agent", "--send", "--local"}))

// on error, the flare output is in the error message
flareCommandOutput = strings.Join([]string{flareCommandOutput, err.Error()}, "\n")
if err != nil {
flareCommandOutput = strings.Join([]string{flareCommandOutput, err.Error()}, "\n")
}

// find <path to flare>.zip in flare command output
// (?m) is a flag that allows ^ and $ to match the beginning and end of each line
Expand Down

0 comments on commit 411d360

Please sign in to comment.