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.
pull/6/head
juanvallejo 2016-09-07 17:20:04 -04:00
parent 184e91bbf6
commit 8faff9f949
No known key found for this signature in database
GPG Key ID: 4FA8D14A0BFE37AD
1 changed files with 1 additions and 1 deletions

View File

@ -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