summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/main.go b/main.go
index f81428c..5427803 100644
--- a/main.go
+++ b/main.go
@@ -8,6 +8,7 @@ import (
"path/filepath"
"time"
+ "go.wit.com/lib/ENV"
"go.wit.com/lib/fhelp"
"go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/shell"
@@ -30,7 +31,7 @@ func main() {
fhelp.CheckGoModCleanExit()
// me.forge.ConfigPrintTable()
- os.Setenv("REPO_WORK_PATH", me.forge.Config.ReposDir)
+ os.Setenv("REPO_WORK_PATH", ENV.Get("gopath"))
// save the ENV var here
me.releaseReasonS = os.Getenv("GUIRELEASE_REASON")
@@ -81,7 +82,15 @@ func main() {
me.Disable()
// todo: add this to forgepb
- me.startRepo = me.forge.FindWorkingDirRepo()
+ // me.startRepo = me.forge.FindWorkingDirRepo()
+ wd, err := os.Getwd()
+ if err != nil {
+ me.argv.BadExit("your current directory does not exist err=", err)
+ }
+ me.startRepo, err = gitpb.NewRepo(wd)
+ if err != nil {
+ me.argv.BadExit("is this really a .git directory? err=", err)
+ }
if _, count, _, err := me.forge.IsEverythingOnMaster(); err != nil {
log.Info("not everything is on the master branch (", count, "repos)")