Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add handlers to manifest push commmand #1555

Merged
merged 20 commits into from
Dec 16, 2024
Prev Previous commit
fix failed test
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
  • Loading branch information
Xiaoxuan Wang committed Dec 16, 2024
commit 5c3721a91b6329b996a3cb67c3db4e0cac3b7b4e
2 changes: 1 addition & 1 deletion cmd/oras/root/manifest/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
return option.Parse(cmd, &opts)
},
RunE: func(cmd *cobra.Command, args []string) error {
opts.Printer.Verbose = opts.verbose && !opts.OutputDescriptor
opts.Printer.Verbose = opts.verbose
return pushManifest(cmd, opts)
},
}
Expand Down Expand Up @@ -194,8 +194,8 @@
return opts.Output(os.Stdout, descJSON)
}
if err := metadataHandler.OnManifestPushed(desc); err != nil {
return err
}

Check warning on line 198 in cmd/oras/root/manifest/push.go

View check run for this annotation

Codecov / codecov/patch

cmd/oras/root/manifest/push.go#L197-L198

Added lines #L197 - L198 were not covered by tests
if len(opts.extraRefs) != 0 {
tagListener := listener.NewTaggedListener(target, metadataHandler.OnTagged)
if _, err = oras.TagBytesN(ctx, tagListener, mediaType, contentBytes, opts.extraRefs, tagBytesNOpts); err != nil {
Expand Down
Loading