Skip to content

Commit

Permalink
Fix segv error for usage error of set env
Browse files Browse the repository at this point in the history
  • Loading branch information
nak3 committed Dec 27, 2017
1 parent 03d5fa0 commit 95e7a0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/oc/cli/cmd/set/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func keyToEnvName(key string) string {
func (o *EnvOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, args []string) error {
resources, envArgs, ok := cmdutil.SplitEnvironmentFromResources(args)
if !ok {
return kcmdutil.UsageErrorf(o.Cmd, "all resources must be specified before environment changes: %s", strings.Join(args, " "))
return kcmdutil.UsageErrorf(cmd, "all resources must be specified before environment changes: %s", strings.Join(args, " "))
}
if len(o.Filenames) == 0 && len(resources) < 1 {
return kcmdutil.UsageErrorf(cmd, "one or more resources must be specified as <resource> <name> or <resource>/<name>")
Expand Down

0 comments on commit 95e7a0a

Please sign in to comment.