diff --git a/cmd/edenSetup.go b/cmd/edenSetup.go index 7406d2b5d..acb13fb2f 100644 --- a/cmd/edenSetup.go +++ b/cmd/edenSetup.go @@ -23,6 +23,9 @@ func newSetupCmd(configName, verbosity *string) *cobra.Command { Long: `Setup harness.`, PersistentPreRunE: preRunViperLoadFunction(cfg, configName, verbosity), Run: func(cmd *cobra.Command, args []string) { + if err := openevec.ConfigCheck(*configName); err != nil { + log.Fatalf("Config check failed %s", err) + } if err := openEVEC.SetupEden(*configName, configDir, softSerial, zedControlURL, ipxeOverride, grubOptions, netboot, installer); err != nil { log.Fatalf("Setup eden failed: %s", err) diff --git a/pkg/openevec/config.go b/pkg/openevec/config.go index 39a0b8162..5a8f0194b 100644 --- a/pkg/openevec/config.go +++ b/pkg/openevec/config.go @@ -315,7 +315,7 @@ func resolvePath(v reflect.Value) { } } -func configCheck(configName string) error { +func ConfigCheck(configName string) error { configFile := utils.GetConfig(configName) configSaved := utils.ResolveAbsPath(fmt.Sprintf("%s-%s", configName, defaults.DefaultConfigSaved)) diff --git a/pkg/openevec/eden.go b/pkg/openevec/eden.go index b0bfabad7..0f41b64e4 100644 --- a/pkg/openevec/eden.go +++ b/pkg/openevec/eden.go @@ -53,10 +53,6 @@ func (openEVEC *OpenEVEC) SetupEden(configName, configDir, softSerial, zedContro cfg := *openEVEC.cfg - if err := configCheck(configName); err != nil { - return err - } - if netboot && installer { return fmt.Errorf("please use netboot or installer flag, not both") }