If github fudges up don't save it

This commit is contained in:
Jguer 2017-05-09 14:44:34 +01:00
parent 6206c105a7
commit d9b793b695

View file

@ -152,7 +152,10 @@ func BranchInfo(pkgname string, owner string, repo string) (err error) {
}
func SaveBranchInfo() error {
marshalledinfo, _ := json.Marshal(savedInfo)
marshalledinfo, err := json.Marshal(savedInfo)
if err != nil || string(marshalledinfo) == "null" {
return err
}
in, err := os.OpenFile(configfile, os.O_RDWR|os.O_CREATE, 0755)
if err != nil {
return err