diff --git a/cmd/flux/resume.go b/cmd/flux/resume.go index fe23a411..e531ecee 100644 --- a/cmd/flux/resume.go +++ b/cmd/flux/resume.go @@ -126,6 +126,17 @@ func (resume resumeCommand) run(cmd *cobra.Command, args []string) error { resume.printMessage(reconcileResps) + // Return an error if any reconciliation failed + var failedCount int + for _, r := range reconcileResps { + if r.resumable != nil && r.err != nil { + failedCount++ + } + } + if failedCount > 0 { + return fmt.Errorf("reconciliation failed for %d %s(s)", failedCount, resume.kind) + } + return nil }