hopefully works?

This commit is contained in:
Jeff Carr 2025-08-21 14:40:41 -05:00
parent fd4b2aa6c9
commit 6db458b2df
2 changed files with 17 additions and 1 deletions

16
init.go
View File

@ -150,6 +150,22 @@ func (f *Forge) InitPB() {
f.rillY = 20
}
// set the URL for forge otherwise fallback to ENV or to forge.wit.com
func (f *Forge) SetForgeURL(url string) {
if url == "" {
url = os.Getenv("FORGE_URL")
}
if url == "" {
url = "https://forge.wit.com/"
}
f.forgeURL = url
log.Info("Forge URL has been set to", f.forgeURL)
}
func (f *Forge) GetForgeURL() string {
return f.forgeURL
}
func (f *Forge) InitMachine() {
if f.Config.Username == "" {
usr, _ := user.Current()

View File

@ -55,7 +55,7 @@ func (f *Forge) submitPatchset(pset *Patchset) error {
newpb := NewPatchsets()
if err := newpb.UnmarshalTEXT(body); err != nil {
log.Infof("forged DID NOT SEND BACK PROTOBUF len(body)=%d %s\n", len(body), body[0:40])
log.Infof("forged DID NOT SEND BACK PROTOBUF len(body)=%d %s (TODO: look for failure on cloudflare 'is human' check here)\n", len(body), body[0:40])
return err
}