Skip to content

Commit

Permalink
fix: ocm transfer ignored --enforce when --overwrite is set
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianburth committed Dec 13, 2024
1 parent e290d01 commit cde2afd
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ versions are re-transported).

func (o *Option) ApplyTransferOption(opts transferhandler.TransferOptions) error {
if (o.overwrite != nil && o.overwrite.Changed) || o.Overwrite {
return standard.Overwrite(o.Overwrite).ApplyTransferOption(opts)
if err := standard.Overwrite(o.Overwrite).ApplyTransferOption(opts); err != nil {
return err
}
}
if (o.enforce != nil && o.enforce.Changed) || o.EnforceTransport {
return standard.EnforceTransport(o.EnforceTransport).ApplyTransferOption(opts)
if err := standard.EnforceTransport(o.EnforceTransport).ApplyTransferOption(opts); err != nil {
return err
}
}
return nil
}

0 comments on commit cde2afd

Please sign in to comment.