update `kubectl expose` output to UsageError

This patch updates `kubectl expose` output (with no resources provided) to a UsageError so that the `kubectl expose -h` suggestion is displayed.
parent 184e91bb
......@@ -147,7 +147,7 @@ func RunExpose(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []str
Do()
err = r.Err()
if err != nil {
return err
return cmdutil.UsageError(cmd, err.Error())
}
// Get the generator, setup and validate all required parameters
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment