add check to NewCmdExec before printing suggestion

checks that the "describe" command and a parent command path exist
before printing suggestion to use the describe command to list
containers in a pod.
This commit is contained in:
juanvallejo
2016-09-28 12:41:42 -04:00
parent 48370b2802
commit 0988f967f0
4 changed files with 35 additions and 14 deletions

View File

@@ -287,7 +287,7 @@ Find more information at https://github.com/kubernetes/kubernetes.`,
NewCmdDescribe(f, out, err),
NewCmdLogs(f, out),
NewCmdAttach(f, in, out, err),
NewCmdExec(cmds.Root().CommandPath(), f, in, out, err),
NewCmdExec(f, in, out, err),
NewCmdPortForward(f, out, err),
NewCmdProxy(f, out),
},