diff options
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -135,14 +135,16 @@ func loadStdConfig() *ForgeConfigs { homeDir, _ := os.UserHomeDir() cfgdir := filepath.Join(homeDir, ".config/forge") - os.MkdirAll(cfgdir, os.ModePerm) - cfg.HomeDir = cfgdir - cfg.ReposDir = filepath.Join(homeDir, "go/src") // todo: check working directory + os.MkdirAll(cfgdir, 0755) + cfg.ReposPB = filepath.Join(cfgdir, "repos.pb") cfg.PatchPB = filepath.Join(cfgdir, "patches.pb") cfg.ForgeURL = "http://forge.wit.com/" + cfg.ReposDir = filepath.Join(homeDir, "go/src") // todo: check working directory + os.MkdirAll(cfg.ReposDir, 0755) + cfg.addSampleConfigs() cfg.DumpENV() config.SetChanged("forge", true) @@ -153,6 +155,9 @@ func loadStdConfig() *ForgeConfigs { log.Info("config save error:", err) os.Exit(-1) } + log.Info("---- ----") + log.Info("---- Welcome to forge!!! ----") + log.Info("---- ----") return cfg } @@ -170,11 +175,4 @@ func (cfg *ForgeConfigs) addSampleConfigs() { newc.Private = true newc.Directory = true cfg.Append(newc) - - newc = new(ForgeConfig) - newc.GoPath = "priv.wit.com/corp" - newc.Writable = true - newc.Private = true - newc.Directory = true - cfg.Append(newc) } |
