fix(dbExecutor): move dbExecutor to runtime config

This commit is contained in:
jguer
2020-07-29 09:16:05 +02:00
parent ad9bc9ef8f
commit 8165174462
4 changed files with 11 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ import (
pacmanconf "github.com/Morganamilo/go-pacmanconf"
"github.com/leonelquinteros/gotext"
"github.com/Jguer/yay/v10/pkg/db"
"github.com/Jguer/yay/v10/pkg/settings"
"github.com/Jguer/yay/v10/pkg/text"
)
@@ -193,6 +194,8 @@ func main() {
exitOnError(initVCS(runtime.VCSPath))
config.Runtime.AlpmHandle, config.Runtime.PacmanConf, err = initAlpm(cmdArgs, config.PacmanConf)
exitOnError(err)
config.Runtime.DBExecutor, err = db.NewExecutor(config.Runtime.AlpmHandle)
exitOnError(err)
exitOnError(handleCmd(cmdArgs, config.Runtime.AlpmHandle))
os.Exit(cleanup(config.Runtime.AlpmHandle))
}