mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
forbid unnamed context
This commit is contained in:
@@ -88,7 +88,7 @@ func (o *useContextOptions) complete(cmd *cobra.Command) error {
|
||||
|
||||
func (o useContextOptions) validate(config *clientcmdapi.Config) error {
|
||||
if len(o.contextName) == 0 {
|
||||
return errors.New("you must specify a current-context")
|
||||
return errors.New("empty context names are not allowed")
|
||||
}
|
||||
|
||||
for name := range config.Contexts {
|
||||
|
||||
Reference in New Issue
Block a user