diff options
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 30 |
1 files changed, 9 insertions, 21 deletions
@@ -18,13 +18,15 @@ import ( func (f *Forge) ConfigSave() error { var err error - // backup the current config files - if e := f.backupConfig(); e != nil { - log.Info("forge.BackupConfig() error", e) - err = e - // continue here? notsure. could be bad either way - // out of disk space? - } + /* + // backup the current config files + if e := f.backupConfig(); e != nil { + log.Info("forge.BackupConfig() error", e) + err = e + // continue here? notsure. could be bad either way + // out of disk space? + } + */ if f.Config != nil { if e := f.Config.ConfigSave(); e != nil { log.Info("forge.Config.ConfigSave() error", e) @@ -101,9 +103,6 @@ func (c *ForgeConfigs) ConfigLoad(fullpath string) error { log.Info("However, the config files could not be loaded") } - // first time user. make a template config file - c.sampleConfig() - return nil } @@ -161,17 +160,6 @@ func configWrite(filename string, data []byte) error { cfgfile.Write([]byte("# git repos you have write access to. That is, where you can run 'git push'\n")) cfgfile.Write([]byte("\n")) } - if filename == "forge.json" { - // add header - cfgfile.Write([]byte("\n")) - cfgfile.Write([]byte("# this file is intended to be used to customize settings on what\n")) - cfgfile.Write([]byte("# git repos you have write access to. That is, where you can run 'git push'\n")) - cfgfile.Write([]byte("\n")) - cfgfile.Write([]byte("# this file is parsed only if forge.text is missing\n")) - cfgfile.Write([]byte("# also, these comment lines don't work in json files and have to be removed for Marshal() to work\n")) - cfgfile.Write([]byte("# probably, JSON syntax for this is just going to be deprecated for the TEXT syntax\n")) - cfgfile.Write([]byte("\n")) - } cfgfile.Write(data) return nil } |
