Skip to content

Commit

Permalink
Merge pull request #3722 from balopat/fix_analyze_update_check
Browse files Browse the repository at this point in the history
Fix analyze update check
  • Loading branch information
balopat authored Feb 24, 2020
2 parents 918b78e + 1331d1c commit c96b1f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/skaffold/app/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,18 @@ func NewSkaffoldCommand(out, err io.Writer) *cobra.Command {
logrus.Infof("Skaffold %+v", version)
event.LogSkaffoldMetadata(version)

if quietFlag {
switch {
case quietFlag:
logrus.Debugf("Update check is disabled because of quiet mode")
} else {
case analyze:
logrus.Debugf("Update check is disabled because of init --analyze")
default:
go func() {
if err := updateCheck(updateMsg, opts.GlobalConfig); err != nil {
logrus.Infof("update check failed: %s", err)
}
}()
}

return nil
},
PersistentPostRun: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 2 additions & 0 deletions pkg/skaffold/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (

"github.com/blang/semver"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"

"github.com/GoogleContainerTools/skaffold/pkg/skaffold/config"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants"
Expand Down Expand Up @@ -65,6 +66,7 @@ func getLatestAndCurrentVersion() (semver.Version, semver.Version, error) {
if err != nil {
return none, none, err
}
logrus.Tracef("latest skaffold version: %s", versionString)
latest, err := version.ParseVersion(versionString)
if err != nil {
return none, none, errors.Wrap(err, "parsing latest version from GCS")
Expand Down

0 comments on commit c96b1f8

Please sign in to comment.