add config option to initialize automaticaly without prompt

This commit is contained in:
Robin Olsen
2026-02-28 10:43:38 +01:00
parent 864cafe6cd
commit 9e42ff0770
3 changed files with 12 additions and 4 deletions

View File

@@ -18,9 +18,11 @@ import (
func NewServices(ctx context.Context, config Config) (*App, func(), error) {
var cleanupFuncs []func()
if !initialized(config.BeadsDBPath) {
fmt.Println("PM is not initialized")
os.Exit(0)
if !config.AutoInit {
if !initialized(config.BeadsDBPath) {
fmt.Println("PM is not initialized")
os.Exit(0)
}
}
store, err := beads.NewSQLiteStorage(ctx, config.BeadsDBPath)