# HG changeset patch # User Paul Fisher # Date 1445744413 14400 # Node ID 406d3cd76739f452a6a59d012067f80772190e5b # Parent 10613f0f473732fa56703bd8450ddb2e5c1f752f Report errors to the user. diff -r 10613f0f4737 -r 406d3cd76739 multipass-add.go --- a/multipass-add.go Sat Oct 24 23:33:16 2015 -0400 +++ b/multipass-add.go Sat Oct 24 23:40:13 2015 -0400 @@ -18,14 +18,19 @@ text, err := reader.ReadString('\n') if err != nil { fmt.Println(err.Error()) - return + os.Exit(1) } text = text[:len(text)-1] entry, password, err := auth.NewEntry(text) if err != nil { fmt.Println(err.Error()) - return + os.Exit(1) } - passfile.Add(entry) + err = passfile.Add(entry) + if err != nil { + fmt.Println("Couldn't create a password:") + fmt.Println(err.Error()) + os.Exit(1) + } fmt.Printf("New password: %s\n", password) }