Skip to content

Commit

Permalink
Merge pull request #168 from CircleCI-Public/update-bug
Browse files Browse the repository at this point in the history
Ensure logger is initialized before using it in cmd/update
  • Loading branch information
Zachary Scott authored Oct 18, 2018
2 parents 3f55781 + 4f301e9 commit a665043
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func newUpdateCommand(config *settings.Config) *cobra.Command {
Short: "Update the tool to the latest version",
PreRun: func(cmd *cobra.Command, args []string) {
opts.args = args
opts.log = logger.NewLogger(config.Debug)
},
RunE: func(_ *cobra.Command, _ []string) error {
return installUpdate(opts)
Expand All @@ -61,6 +62,7 @@ func newUpdateCommand(config *settings.Config) *cobra.Command {
Short: "Update the build agent to the latest version",
PreRun: func(cmd *cobra.Command, args []string) {
opts.args = args
opts.log = logger.NewLogger(config.Debug)
},
RunE: func(_ *cobra.Command, _ []string) error {
return updateBuildAgent(opts)
Expand Down

0 comments on commit a665043

Please sign in to comment.