File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 55 "encoding/json"
66 "fmt"
77 "io/ioutil"
8+ "log"
89 "os"
910 "path"
1011 "path/filepath"
@@ -53,8 +54,7 @@ func Usage() {
5354 fmt .Printf ("\t %-11s \t %s\n " , cmd .Name (), cmd .Short )
5455 }
5556 }
56- fmt .Printf ("\n Use \" %s help <command>\" for more information about a command." , CmdName )
57- fmt .Println ()
57+ fmt .Printf ("\n Use \" %s help <command>\" for more information about a command.\n " , CmdName )
5858 Exit ()
5959}
6060
@@ -92,13 +92,12 @@ func getFilePath(filename string) string {
9292
9393func CheckErr (err error ) {
9494 if err != nil {
95- fmt .Println (err .Error ())
96- Exit ()
95+ log .Fatalln (err )
9796 }
9897}
9998
10099func Exit () {
101- os .Exit (1 )
100+ os .Exit (0 )
102101}
103102
104103func AuthInfo (cmd string ) string {
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ func runHelper(cmd *base.Command, args []string) {
2222 buf .WriteString (base .AuthInfo ("helper" ))
2323 buf .WriteString ("\n # Helper\n \n " )
2424 buf .WriteString ("```text\n " )
25- out , _ := exec .Command (base .CmdName ).Output ()
25+ out , err := exec .Command (base .CmdName ).Output ()
26+ base .CheckErr (err )
2627 buf .Write (out )
2728 buf .WriteString ("```\n " )
2829 base .FilePutContents ("helper/README.md" , buf .Bytes ())
You can’t perform that action at this time.
0 commit comments