Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cmd/argocd/commands/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3327,6 +3327,14 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob
log.Fatalf("Unknown source type '%s'", source)
}

// If no resources are found, there are two possible reasons
// either the application doesn't have manifests associated with it
// OR the redis cache is empty. Hence it is better to return early
if len(unstructureds) == 0 {
log.Infof("no Kubernetes resources found for application %q:"+
" manifests may not exist or the Redis cache is empty", appName)
return
}
for _, obj := range unstructureds {
fmt.Println("---")
yamlBytes, err := yaml.Marshal(obj)
Expand Down
Loading