Merge branch 'dev-profiles' of dan/ui into master
the build failed Details

This commit is contained in:
Sarah Jamie Lewis 2019-09-30 11:28:00 -07:00 committed by Gogs
commit 62911b03fa
2 changed files with 14 additions and 3 deletions

View File

@ -56,8 +56,11 @@ func AppEventListener(gcd *gothings.GrandCentralDispatcher, subscribed chan bool
if e.Data[event.Error] == event.AppErrLoaded0 {
// TODO: only an error if other profiles are not loaded
log.Infoln("couldn't load your config file. attempting to create one now")
the.CwtchApp.CreatePeer("alice", the.AppPassword)
if gcd.Version() == "development" {
the.CwtchApp.CreatePeer("tester", the.AppPassword)
} else {
the.CwtchApp.CreatePeer("alice", the.AppPassword)
}
}
case event.ReloadDone:

10
main.go
View File

@ -57,7 +57,9 @@ func main() {
}
// TESTING
//log.SetLevel(log.LevelDebug)
if buildVer == "" {
log.SetLevel(log.LevelDebug)
}
//log.ExcludeFromPattern("connection/connection")
//log.ExcludeFromPattern("outbound/3dhauthchannel")
//log.AddNothingExceptFilter("event/eventmanager")
@ -74,6 +76,12 @@ func main() {
}
the.CwtchDir = path.Join(usr.HomeDir, ".cwtch")
}
if buildVer == "" && os.Getenv("CWTCH_FOLDER") == "" {
log.Infoln("Development build: using dev directory for dev profiles")
the.CwtchDir = path.Join(the.CwtchDir, "dev")
}
the.ACN = nil
the.Peer = nil
the.IPCBridge = nil