Skip to content

Commit

Permalink
fix(agent): fix err scope.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiz Pegoraro committed Nov 16, 2023
1 parent 3056bbd commit 5b17f69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/backend/otel/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (o *openTelemetryBackend) RemovePolicy(data policies.PolicyData) error {
return err
}
policyPath := o.policyConfigDirectory + fmt.Sprintf(tempFileNamePattern, data.ID)
if err = os.Remove(policyPath); err != nil && err != os.ErrNotExist {
if err := os.Remove(policyPath); err != nil && err != os.ErrNotExist {
o.logger.Error("error removing temporary file with policy", zap.Error(err))
return err
}
Expand Down

0 comments on commit 5b17f69

Please sign in to comment.