1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Improve error message in get cmd

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
Somtochi Onyekwere
2022-08-22 20:32:41 +01:00
parent f880cce4f9
commit ad0f3373b6

View File

@@ -162,7 +162,9 @@ func (get getCommand) run(cmd *cobra.Command, args []string) error {
}
if get.list.len() == 0 {
if !getAll {
if len(args) > 0 {
logger.Failuref("%s object '%s' not found in '%s' namespace", get.kind, args[0], *kubeconfigArgs.Namespace)
} else if !getAll {
logger.Failuref("no %s objects found in %s namespace", get.kind, *kubeconfigArgs.Namespace)
}
return nil