summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config.go')
-rw-r--r--config.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/config.go b/config.go
index b51b99f..5c8f2a3 100644
--- a/config.go
+++ b/config.go
@@ -6,6 +6,7 @@ import (
"errors"
"os"
+ "go.wit.com/lib/ENV"
"go.wit.com/lib/config"
"go.wit.com/lib/protobuf/argvpb"
"go.wit.com/log"
@@ -61,11 +62,11 @@ func (f *Forge) SetMode(newmode ForgeMode) error {
return nil
}
f.mode = newmode
- err := config.Set("mode", newmode.String())
+ err := ENV.Set("mode", newmode.String())
if err != nil {
panic("config.Set() doesn't work")
}
- err = config.Save()
+ err = ENV.Save()
if err != nil {
panic("config.Save() doesn't work")
}
@@ -102,8 +103,8 @@ func (f *Forge) DumpENV() {
}
func DumpENV() {
- log.Infof("forge ReposDir = %s\n", config.Get("ReposDir"))
- log.Infof("forge ForgeURL = %s\n", config.Get("ForgeURL"))
+ log.Infof("forge ReposDir = %s\n", ENV.Get("ReposDir"))
+ log.Infof("forge ForgeURL = %s\n", ENV.Get("ForgeURL"))
}
func loadStdConfig() (*ForgeConfigs, error) {
@@ -134,7 +135,6 @@ func makeDefaultConfig() (*ForgeConfigs, error) {
cfg.addSampleConfigs()
DumpENV()
- config.SetChanged("forge", true)
var err error
if err = cfg.SaveVerbose(); err != nil {
log.Info("config save error:", err)