fix: add db.Init() in bash completion

This commit is contained in:
2025-03-09 17:30:02 +03:00
parent a7d016abc9
commit 9085e38454
7 changed files with 22 additions and 16 deletions

View File

@ -119,6 +119,11 @@ func InstallCmd() *cli.Command {
BashComplete: func(c *cli.Context) {
cfg := config.New()
db := database.New(cfg)
err := db.Init(c.Context)
if err != nil {
slog.Error(gotext.Get("Error initialization database"), "err", err)
os.Exit(1)
}
result, err := db.GetPkgs(c.Context, "true")
if err != nil {
slog.Error(gotext.Get("Error getting packages"), "err", err)