* /{cmd,internal}: get dolt backend init working and allow issue creation
* /{website,internal,docs,cmd}: integration tests and more split backend fixes
* /{cmd,internal}: fix lint issues
* /cmd/bd/doctor/integrity.go: fix unable to query issues bug with dolt backend
* /cmd/bd/daemon.go: remove debug logging
20 lines
562 B
Go
20 lines
562 B
Go
package doctor
|
|
|
|
import (
|
|
"path/filepath"
|
|
|
|
"github.com/steveyegge/beads/internal/configfile"
|
|
)
|
|
|
|
// getBackendAndBeadsDir resolves the effective .beads directory (following redirects)
|
|
// and returns the configured storage backend ("sqlite" by default, or "dolt").
|
|
func getBackendAndBeadsDir(repoPath string) (backend string, beadsDir string) {
|
|
beadsDir = resolveBeadsDir(filepath.Join(repoPath, ".beads"))
|
|
|
|
cfg, err := configfile.Load(beadsDir)
|
|
if err != nil || cfg == nil {
|
|
return configfile.BackendSQLite, beadsDir
|
|
}
|
|
return cfg.GetBackend(), beadsDir
|
|
}
|