add config option to initialize automaticaly without prompt
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user