summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config.go')
-rw-r--r--config.go18
1 files changed, 8 insertions, 10 deletions
diff --git a/config.go b/config.go
index 600becd..5bdc770 100644
--- a/config.go
+++ b/config.go
@@ -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)
}