summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/init.go b/init.go
index 6962c67..90bb402 100644
--- a/init.go
+++ b/init.go
@@ -76,6 +76,7 @@ func (f *Forge) postInit() error {
if godir, ok := fhelp.FindGoWork(); ok {
f.mode = ForgeMode_GOLANG
cache = "gowork"
+ env.SetGlobal("lib/forgepb", "GoWork", "true")
env.SetGlobal("lib/forgepb", "gopath", godir)
fullname := filepath.Join(godir, "gowork.pb")
env.SetGlobal("lib/forgepb", "ReposPB", fullname)
@@ -141,14 +142,14 @@ func (f *Forge) postInit() error {
}
} else {
log.Printf("forge failed to load %s file with len(%d) repos err=(%v)\n", f.Repos.Filename, f.Repos.Len(), err)
- panic("failed to load repos.pb")
+ panic("failed to load .pb cache")
}
err = f.patchesCacheLoad() // loads the file from ~/.cache/forge/patches.pb
if err == nil {
// log.Printf("forge loaded %s file with len(%d) repos\n", f.Repos.Filename, f.Repos.Len())
} else {
log.Printf("forge failed to load %s file with len(%d) patches err=(%v)\n", f.Patches.Filename, f.Patches.Len(), err)
- panic("failed to load repos.pb")
+ panic("failed to load .pb cache")
}
return err
}