Log source sync failure message

pull/5/head
stefanprodan 5 years ago
parent 0f5204a8c1
commit a9128a2cb4

@ -150,7 +150,7 @@ func createSourceCmdRun(cmd *cobra.Command, args []string) error {
logAction("waiting for source sync")
if err := wait.PollImmediate(2*time.Second, timeout,
isGitRepositoryReady(ctx, kubeClient, name, namespace)); err != nil {
return fmt.Errorf("source sync failed: %w", err)
return err
}
logSuccess("source %s is ready", name)
@ -240,7 +240,7 @@ func isGitRepositoryReady(ctx context.Context, kubeClient client.Client, name, n
if condition.Status == corev1.ConditionTrue {
return true, nil
} else if condition.Status == corev1.ConditionFalse {
return false, nil
return false, fmt.Errorf(condition.Message)
}
}
}

Loading…
Cancel
Save