mirror of
https://github.com/mudler/luet.git
synced 2025-09-03 00:06:36 +00:00
Define context for scoped operation across core types
It holds necessary state plus additional information relative to the context which we are being run to (e.g. if we are in a terminal or not). Besides in the future we can use it also as a contextual logger to provide more smart logging capabilities. This also replace the general global configuration instance that previously was share between the core components.
This commit is contained in:
@@ -22,8 +22,6 @@ import (
|
||||
"github.com/mudler/luet/cmd/util"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
. "github.com/mudler/luet/pkg/config"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -43,9 +41,9 @@ To return also files:
|
||||
},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
showFiles, _ := cmd.Flags().GetBool("files")
|
||||
util.SetSystemConfig()
|
||||
util.SetSystemConfig(util.DefaultContext)
|
||||
|
||||
systemDB := LuetCfg.GetSystemDB()
|
||||
systemDB := util.DefaultContext.Config.GetSystemDB()
|
||||
|
||||
for _, a := range args {
|
||||
pack, err := helpers.ParsePackageStr(a)
|
||||
|
Reference in New Issue
Block a user