mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-24 09:50:08 +00:00
This commit is contained in:
parent
6c0e21780c
commit
b3ade6159e
1 changed files with 1 additions and 1 deletions
|
|
@ -802,7 +802,7 @@ func (s *Server) Sync(ctx context.Context, syncReq *ApplicationSyncRequest) (*ap
|
|||
return nil, status.Errorf(codes.FailedPrecondition, "application is deleting")
|
||||
}
|
||||
if a.Spec.SyncPolicy != nil && a.Spec.SyncPolicy.Automated != nil {
|
||||
if syncReq.Revision != "" && syncReq.Revision != a.Spec.Source.TargetRevision {
|
||||
if syncReq.Revision != "" && syncReq.Revision != util.FirstNonEmpty(a.Spec.Source.TargetRevision, "HEAD") {
|
||||
return nil, status.Errorf(codes.FailedPrecondition, "Cannot sync to %s: auto-sync currently set to %s", syncReq.Revision, a.Spec.Source.TargetRevision)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue