From 9921486669d98ce1ebe0d8afd0cb9db73b369f3e Mon Sep 17 00:00:00 2001 From: suhussai Date: Fri, 3 Nov 2017 00:28:37 -0600 Subject: [PATCH] check if err is nil before printing it --- cmd/bootstrap.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/bootstrap.go b/cmd/bootstrap.go index 3c164c9f4..100190653 100644 --- a/cmd/bootstrap.go +++ b/cmd/bootstrap.go @@ -18,7 +18,9 @@ func (b *BootstrapCmd) Init() *cobra.Command { Short: "Start a guided tour of Atlantis", RunE: func(cmd *cobra.Command, args []string) error { err := bootstrap.Start() - fmt.Fprintf(os.Stderr, "\033[31mError: %s\033[39m\n\n", err.Error()) + if err != nil { + fmt.Fprintf(os.Stderr, "\033[31mError: %s\033[39m\n\n", err.Error()) + } return err }, }