config: add some validations (#3610)

This commit is contained in:
fatedier authored and GitHub committed 2023-09-13 18:59:51 +08:00
1 parent 7cd02f5bd8
commit 74255f711e
9 files changed
+144 -20

No files matched your search

+1 -1
View File
@@ -117,6 +117,7 @@ var rootCmd = &cobra.Command{
// Do not show command usage here.
err := runClient(cfgFile)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
return nil
@@ -199,7 +200,6 @@ func parseClientCommonCfgFromCmd() (*v1.ClientCommonConfig, error) {
func runClient(cfgFilePath string) error {
cfg, pxyCfgs, visitorCfgs, isLegacyFormat, err := config.LoadClientConfig(cfgFilePath)
if err != nil {
fmt.Println(err)
return err
}
if isLegacyFormat {