diff --git a/cmd/gateway_sync.go b/cmd/gateway_sync.go index 11e236ca6..f207756bd 100644 --- a/cmd/gateway_sync.go +++ b/cmd/gateway_sync.go @@ -28,9 +28,9 @@ func newSyncCmd(deprecated bool) *cobra.Command { execute := executeSync argsValidator := cobra.MinimumNArgs(0) preRun := func(cmd *cobra.Command, args []string) error { - diffCmdKongStateFile = args - if len(diffCmdKongStateFile) == 0 { - diffCmdKongStateFile = []string{"-"} + syncCmdKongStateFile = args + if len(syncCmdKongStateFile) == 0 { + syncCmdKongStateFile = []string{"-"} } return preRunSilenceEventsFlag() } @@ -45,7 +45,7 @@ func newSyncCmd(deprecated bool) *cobra.Command { } argsValidator = validateNoArgs preRun = func(cmd *cobra.Command, args []string) error { - if len(diffCmdKongStateFile) == 0 { + if len(syncCmdKongStateFile) == 0 { return fmt.Errorf("a state file with Kong's configuration " + "must be specified using `-s`/`--state` flag") } diff --git a/cmd/gateway_validate.go b/cmd/gateway_validate.go index 8903171a7..30e478570 100644 --- a/cmd/gateway_validate.go +++ b/cmd/gateway_validate.go @@ -94,7 +94,7 @@ and alerts if there are broken relationships, or missing links present. if deprecated { use = "validate" - short = "[deprecated] use 'gateway validate' instead" + short = "[deprecated] use 'gateway validate' or 'file validate' instead" long = `The validate command reads the state file and ensures validity. It reads all the specified state files and reports YAML/JSON parsing issues. It also checks for foreign relationships