From 2f4d064a416f0b81908e12a784468da99c3c9387 Mon Sep 17 00:00:00 2001 From: Josh VanderLinden Date: Fri, 6 Oct 2017 12:15:24 -0400 Subject: [PATCH] Friendlier output --- cmd/util.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/util.go b/cmd/util.go index a9314ea..6c032c3 100644 --- a/cmd/util.go +++ b/cmd/util.go @@ -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. @@ -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) }