fix install bash complete

This commit is contained in:
2025-03-30 11:29:24 +03:00
parent 4b35f5e4e6
commit 70aca61750
3 changed files with 13 additions and 7 deletions

View File

@ -124,8 +124,14 @@ func InstallCmd() *cli.Command {
},
BashComplete: func(c *cli.Context) {
cfg := config.New()
err := cfg.Load()
if err != nil {
slog.Error(gotext.Get("Error loading config"), "err", err)
os.Exit(1)
}
db := database.New(cfg)
err := db.Init(c.Context)
err = db.Init(c.Context)
if err != nil {
slog.Error(gotext.Get("Error initialization database"), "err", err)
os.Exit(1)