diff --git a/cmd/flux/get.go b/cmd/flux/get.go index ac099a9f..84a7573a 100644 --- a/cmd/flux/get.go +++ b/cmd/flux/get.go @@ -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