mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 07:35:07 +00:00
config: add some validations (#3610)
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user