summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-15 18:20:36 -0500
committerJeff Carr <[email protected]>2025-10-15 18:20:36 -0500
commit469d36d22db31ea3c8e924038c3a970d499c5f13 (patch)
tree66aadcf76fd2b69bae57e7374dcf5f3fce0d05bc
parenta739e4c5f4f6fbfe269b2243047fdcda1d487cb0 (diff)
around the block again on forge rebuild forge
-rw-r--r--doRebuild.go14
-rw-r--r--main.go1
-rw-r--r--resources/GOPATH5
3 files changed, 17 insertions, 3 deletions
diff --git a/doRebuild.go b/doRebuild.go
index 1bb94c3..e00ed53 100644
--- a/doRebuild.go
+++ b/doRebuild.go
@@ -7,6 +7,7 @@ package main
import (
"errors"
+ "fmt"
"os"
"go.wit.com/lib/fhelp"
@@ -27,6 +28,11 @@ func doRebuild() (string, error) {
func doRebuildForge() (string, error) {
log.Info("download here")
+ if path, err := fhelp.CheckCmd("goimports"); err != nil {
+ log.Info("go-clone missing", path, err)
+ cmd := []string{"go", "install", "golang.org/x/tools/cmd/goimports@latest"}
+ shell.RunRealtime(cmd)
+ }
if path, err := fhelp.CheckCmd("go-clone"); err != nil {
log.Info("go-clone missing", path, err)
cmd := []string{"go", "install", "go.wit.com/apps/go-clone@latest"}
@@ -41,8 +47,12 @@ func doRebuildForge() (string, error) {
shell.RunRealtime(cmd)
}
if path, err := fhelp.CheckCmd("go-clone"); err != nil {
- log.Info("can't prep build. you probably need ~/go/bin in your PATH", path, err)
- return "", errors.New("prep build failed")
+ pfile, _ := resources.ReadFile("resources/GOPATH")
+ log.Info("")
+ log.Info(string(pfile))
+ log.Info("may be at:", path)
+ s := fmt.Sprintf("setup PATH")
+ return s, errors.New("prep build failed")
}
var basecmd []string
var cmd []string
diff --git a/main.go b/main.go
index 9baff99..1fe1828 100644
--- a/main.go
+++ b/main.go
@@ -59,7 +59,6 @@ func main() {
}
if me.sh.Cmd == "" {
- log.Info("forge DOING DEFAULT BEHAVIOR")
s, err := doDefaultBehavior()
if err != nil {
me.sh.BadExit(s, err)
diff --git a/resources/GOPATH b/resources/GOPATH
new file mode 100644
index 0000000..f512820
--- /dev/null
+++ b/resources/GOPATH
@@ -0,0 +1,5 @@
+#######################################################
+# #
+# Your PATH does not seem to include ~/go/bin #
+# #
+#######################################################