summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/init.go b/init.go
index 93d0cbb..618bf60 100644
--- a/init.go
+++ b/init.go
@@ -12,10 +12,13 @@ import (
func Init() *Forge {
f := new(Forge)
+ getwd, _ := os.Getwd()
+ log.Info("forgepbb.Init() os.Getwd()", getwd)
+ log.Info("forgepbb.Init() started with FORGE_CONFIG", os.Getenv("FORGE_CONFIG"))
+ log.Info("forgepbb.Init() started with FORGE_GOSRC", os.Getenv("FORGE_GOSRC"))
// TODO: rethink this but it works for now
gosrc := os.Getenv("FORGE_GOSRC")
if gosrc == "" {
- // already set. ignore init()
goSrcDir, err := f.findGoSrc()
if err != nil {
log.Warn("forge init() findGoSrc()", err)
@@ -23,6 +26,7 @@ func Init() *Forge {
os.Setenv("FORGE_GOSRC", goSrcDir)
}
f.goSrc = os.Getenv("FORGE_GOSRC")
+ log.Info("forge.Init() using ~/go/src directory", f.goSrc)
// also rethink this, but maybe this is the right thing to do
if os.Getenv("FORGE_CONFIG") == "" {
@@ -30,6 +34,9 @@ func Init() *Forge {
fullpath := filepath.Join(homeDir, ".config/forge")
os.Setenv("FORGE_CONFIG", fullpath)
}
+ log.Info("forgepbb.Init() ~/go/src ", f.goSrc)
+ log.Info("forgepbb.Init() 2 FORGE_CONFIG", os.Getenv("FORGE_CONFIG"))
+ log.Info("forgepbb.Init() 2 FORGE_GOSRC", os.Getenv("FORGE_GOSRC"))
// cache.go has Do()
// f.initOnce.Do(f.initWork)