summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-07 16:50:04 -0600
committerJeff Carr <[email protected]>2024-12-07 16:50:04 -0600
commitc08079fc2fba6d5dd65bc878e51dc59680f2de5e (patch)
tree368d54529d4970afcdeafe12de74d165edb2fa08 /init.go
parent7f1f8d4028fada967beb484e30a336dfa30e6806 (diff)
deubgging auto go buildv0.0.27
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)