revert change related to reading prov file

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
pull/9782/head
Josh Dolitsky 4 years ago
parent ec84339d44
commit 4884ca0059
No known key found for this signature in database
GPG Key ID: B2B93673243A65FB

@ -67,11 +67,11 @@ func (pusher *OCIPusher) push(chartRef, href string) error {
var pushOpts []registry.PushOption var pushOpts []registry.PushOption
provRef := fmt.Sprintf("%s.prov", chartRef) provRef := fmt.Sprintf("%s.prov", chartRef)
if provBytes, err := ioutil.ReadFile(provRef); err != nil { if _, err := os.Stat(provRef); err == nil {
if err != os.ErrNotExist { // ignore error if .prov does not exist provBytes, err := ioutil.ReadFile(provRef)
if err != nil {
return err return err
} }
} else {
pushOpts = append(pushOpts, registry.PushOptProvData(provBytes)) pushOpts = append(pushOpts, registry.PushOptProvData(provBytes))
} }

Loading…
Cancel
Save