Skip to content

Commit

Permalink
Only check for the latest release when doing auth.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgbkrk committed Oct 27, 2015
1 parent 9d5dd64 commit 885c4e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ func New() *Application {

cap.Application = app

cap.PreAction(informLatest)

cap.Context = ctx

cap.Flag("username", "Carina username - can also set env var "+UserNameEnvVar).OverrideDefaultFromEnvar(UserNameEnvVar).StringVar(&ctx.Username)
Expand Down Expand Up @@ -293,6 +291,9 @@ func informLatest(pc *kingpin.ParseContext) error {
// Auth does the authentication
func (carina *Command) Auth(pc *kingpin.ParseContext) (err error) {

// Check for the latest release.
informLatest(pc)

if carina.Username == "" || carina.APIKey == "" {
// Backwards compatibility for prior releases, to be deprecated
// Check on RACKSPACE_USERNAME
Expand Down

0 comments on commit 885c4e2

Please sign in to comment.