virtctl, write cmd's parameter count errors to stderr
@@ -57,7 +57,7 @@ func OptionsUsageTemplate() string {
func ExactArgs(nameOfCommand string, n int) cobra.PositionalArgs {
return func(cmd *cobra.Command, args []string) error {
if len(args) != n {
- fmt.Printf("fatal: Number of input parameters is incorrect, %s accepts %d arg(s), received %d\n\n", nameOfCommand, n, len(args))
+ fmt.Fprintf(os.Stderr, "fatal: Number of input parameters is incorrect, %s accepts %d arg(s), received %d\n\n", nameOfCommand, n, len(args))
cmd.Help()
return errors.New("argument validation failed")
}
