Skip to content

Commit

Permalink
feat: oras discover should show a placeholder of artifactType if it's…
Browse files Browse the repository at this point in the history
… not presented

Signed-off-by: Xiaoxuan Wang <[email protected]>
  • Loading branch information
wangxiaoxuan273 committed Apr 11, 2024
1 parent 1494475 commit 3bba5d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/oras/root/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ func fetchAllReferrers(ctx context.Context, repo oras.ReadOnlyGraphTarget, desc

for _, r := range results {
// Find all indirect referrers
if r.ArtifactType == "" {
r.ArtifactType = "<unknown>"

Check warning on line 154 in cmd/oras/root/discover.go

View check run for this annotation

Codecov / codecov/patch

cmd/oras/root/discover.go#L154

Added line #L154 was not covered by tests
}
referrerNode := node.AddPath(r.ArtifactType, r.Digest)
if opts.Verbose {
for k, v := range r.Annotations {
Expand Down

0 comments on commit 3bba5d3

Please sign in to comment.