sometimes, just care about the sun
This commit is contained in:
parent
722ebeeef8
commit
da649abceb
|
@ -35,14 +35,12 @@ func (all *Repos) ConfigSave() error {
|
||||||
data, err = all.Marshal()
|
data, err = all.Marshal()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// validate & sanitize strings worked
|
// validate & sanitize strings worked
|
||||||
log.Info("gitpb.ConfigSave() repos.Marshal() worked len", len(all.Repos), "repos")
|
|
||||||
configWrite("repos.pb", data)
|
configWrite("repos.pb", data)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
log.Info("gitpb.ConfigSave() repos.Marshal() worked len", len(all.Repos), "repos")
|
|
||||||
configWrite("repos.pb", data)
|
configWrite("repos.pb", data)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -151,6 +149,7 @@ func loadFile(fullname string) ([]byte, error) {
|
||||||
func configWrite(filename string, data []byte) error {
|
func configWrite(filename string, data []byte) error {
|
||||||
fullname := filepath.Join(os.Getenv("FORGE_GOSRC"), filename)
|
fullname := filepath.Join(os.Getenv("FORGE_GOSRC"), filename)
|
||||||
|
|
||||||
|
log.Infof("%s your repos have changed state. cached state. (%d) bytes\n", fullname, len(data))
|
||||||
cfgfile, err := os.OpenFile(fullname, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
|
cfgfile, err := os.OpenFile(fullname, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
|
||||||
defer cfgfile.Close()
|
defer cfgfile.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue