mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
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.
This commit is contained in:
parent
184e91bbf6
commit
8faff9f949
@ -147,7 +147,7 @@ func RunExpose(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []str
|
|||||||
Do()
|
Do()
|
||||||
err = r.Err()
|
err = r.Err()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return cmdutil.UsageError(cmd, err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the generator, setup and validate all required parameters
|
// Get the generator, setup and validate all required parameters
|
||||||
|
Loading…
Reference in New Issue
Block a user