Skip to content

Commit

Permalink
resolved comments
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <[email protected]>
  • Loading branch information
Xiaoxuan Wang committed Oct 14, 2024
1 parent 38ec117 commit 955ade6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions cmd/oras/root/manifest/index/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ func fetchSourceManifests(ctx context.Context, target oras.ReadOnlyTarget, opts
return nil, fmt.Errorf("%s is not a manifest", source)
}
opts.Println(status.IndexPromptFetched, source)
desc, err = enrichDescriptor(ctx, target, desc, content)
if err != nil {
if desc, err = enrichDescriptor(ctx, target, desc, content); err != nil {
return nil, err

Check warning on line 157 in cmd/oras/root/manifest/index/create.go

View check run for this annotation

Codecov / codecov/patch

cmd/oras/root/manifest/index/create.go#L157

Added line #L157 was not covered by tests
}
resolved = append(resolved, desc)
Expand Down
3 changes: 1 addition & 2 deletions cmd/oras/root/manifest/index/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ func addManifests(ctx context.Context, manifests []ocispec.Descriptor, target or
return nil, fmt.Errorf("%s is not a manifest", manifestRef)
}
printUpdateStatus(status.IndexPromptFetched, manifestRef, string(desc.Digest), opts.Printer)
desc, err = enrichDescriptor(ctx, target, desc, content)
if err != nil {
if desc, err = enrichDescriptor(ctx, target, desc, content); err != nil {
return nil, err

Check warning on line 185 in cmd/oras/root/manifest/index/update.go

View check run for this annotation

Codecov / codecov/patch

cmd/oras/root/manifest/index/update.go#L185

Added line #L185 was not covered by tests
}
manifests = append(manifests, desc)
Expand Down

0 comments on commit 955ade6

Please sign in to comment.