Add --values flag also to luet tree images

This commit is contained in:
Ettore Di Giacinto
2021-08-09 12:57:36 +02:00
parent 10ae872a3e
commit 2789f59f53
3 changed files with 15 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ package util
import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/mudler/luet/pkg/config"
. "github.com/mudler/luet/pkg/config"
@@ -35,6 +36,14 @@ func BindSolverFlags(cmd *cobra.Command) {
LuetCfg.Viper.BindPFlag("solver.max_attempts", cmd.Flags().Lookup("solver-attempts"))
}
func BindValuesFlags(cmd *cobra.Command) {
viper.BindPFlag("values", cmd.Flags().Lookup("values"))
}
func ValuesFlags() []string {
return viper.GetStringSlice("values")
}
func SetSystemConfig() {
dbpath := LuetCfg.Viper.GetString("system.database_path")
rootfs := LuetCfg.Viper.GetString("system.rootfs")