added new build in vars to rest of binaries

Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
Christian Goll
2023-03-03 16:21:44 +01:00
parent ca088d123d
commit b55473e1e4
7 changed files with 17 additions and 16 deletions

View File

@@ -63,7 +63,7 @@ func GetRootCommand() *cobra.Command {
return rootCmd
}
func rootPersistentPreRunE(cmd *cobra.Command, args []string) error {
func rootPersistentPreRunE(cmd *cobra.Command, args []string) (err error) {
if DebugFlag {
wwlog.SetLogLevel(wwlog.DEBUG)
} else if verboseArg {
@@ -76,9 +76,9 @@ func rootPersistentPreRunE(cmd *cobra.Command, args []string) error {
}
conf := warewulfconf.New()
if WarewulfConfArg != "" {
conf.ReadConf(WarewulfConfArg)
err = conf.ReadConf(WarewulfConfArg)
} else if os.Getenv("WAREWULFCONF") != "" {
conf.ReadConf(os.Getenv("WAREWULFCONF"))
err = conf.ReadConf(os.Getenv("WAREWULFCONF"))
}
return nil
return
}