Skip to content

Commit

Permalink
clients: ensuring the user agent is set even if there's no partner id
Browse files Browse the repository at this point in the history
The check for `partner_id` happens within the setUserAgent function
so we can instead delegate to that and ensure this is always set
  • Loading branch information
tombuildsstuff committed Sep 30, 2019
1 parent b9a8153 commit 2b75869
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions azurerm/internal/common/client_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ type ClientOptions struct {
}

func (o ClientOptions) ConfigureClient(c *autorest.Client, authorizer autorest.Authorizer) {
if o.PartnerId != "" {
setUserAgent(c, o.PartnerId)
}
setUserAgent(c, o.PartnerId)

c.Authorizer = authorizer
c.Sender = sender.BuildSender("AzureRM")
Expand Down

0 comments on commit 2b75869

Please sign in to comment.