Skip to content

Commit

Permalink
skip update checking if DisableUpdateCheck is set to true
Browse files Browse the repository at this point in the history
  • Loading branch information
chelseakomlo committed Aug 10, 2018
1 parent b468103 commit 82c096b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions command/agent/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,9 @@ func (c *Command) setupAgent(config *Config, logOutput io.Writer, inmem *metrics
}
c.httpServer = http

// Setup update checking
if config.DisableUpdateCheck != nil && *config.DisableUpdateCheck {
// If DisableUpdateCheck is not enabled, set up update checking
// (DisableUpdateCheck is false by default)
if config.DisableUpdateCheck != nil && !*config.DisableUpdateCheck {
version := config.Version.Version
if config.Version.VersionPrerelease != "" {
version += fmt.Sprintf("-%s", config.Version.VersionPrerelease)
Expand Down

0 comments on commit 82c096b

Please sign in to comment.