Issue #1366 - Fix null pointer dereference error in 'argocd app wait' (#1380)

This commit is contained in:
Alexander Matyushentsev 2019-04-04 17:49:34 -07:00 committed by GitHub
parent 4d494f3a1b
commit ac7906fdea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1483,6 +1483,9 @@ const printOpFmtStr = "%-20s%s\n"
const defaultCheckTimeoutSeconds = 0
func printOperationResult(opState *argoappv1.OperationState) {
if opState == nil {
return
}
if opState.SyncResult != nil {
fmt.Printf(printOpFmtStr, "Operation:", "Sync")
fmt.Printf(printOpFmtStr, "Sync Revision:", opState.SyncResult.Revision)