Skip to content

Commit

Permalink
Friendlier output
Browse files Browse the repository at this point in the history
  • Loading branch information
codekoala committed Oct 6, 2017
1 parent 4c1210b commit 2f4d064
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import (
)

var (
ErrCanceled = errors.New("Canceled")
ErrInvalidProfile = errors.New("invalid profile selected")
ErrCanceled = errors.New("Canceled")
)

// InputParseFunction deal with validating and saving user input to the appropriate variable.
Expand All @@ -29,7 +28,7 @@ type InputParseFunction func(string) error
func RequireProfile(cmd *cobra.Command, args []string) (err error) {
fmt.Printf("Current profile: %s\n", Config.Profile)
if profile, err = Config.GetCurrentProfile(); err != nil || profile == nil {
fmt.Println(ErrInvalidProfile)
fmt.Printf("Error: %s\n", err)
os.Exit(1)
}

Expand Down

0 comments on commit 2f4d064

Please sign in to comment.