Skip to content

Commit

Permalink
fix a bug for used platform variable
Browse files Browse the repository at this point in the history
Signed-off-by: Haoliang Yue <[email protected]>
  • Loading branch information
yuehaoliang committed Sep 19, 2022
1 parent 66229b4 commit 98e2ee2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/oras/manifest/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func fetchManifest(opts fetchOptions) (fetchErr error) {
// fetch manifest descriptor only
fetchOpts := oras.DefaultResolveOptions
fetchOpts.TargetPlatform = targetPlatform
desc, err = oras.Resolve(ctx, manifests, opts.targetRef, oras.DefaultResolveOptions)
desc, err = oras.Resolve(ctx, manifests, opts.targetRef, fetchOpts)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/manifest/fetch_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func fetchConfigDesc(ctx context.Context, src oras.ReadOnlyTarget, reference str
// fetch manifest descriptor and content
fetchOpts := oras.DefaultFetchBytesOptions
fetchOpts.TargetPlatform = targetPlatform
manifestDesc, manifestContent, err := oras.FetchBytes(ctx, src, reference, oras.DefaultFetchBytesOptions)
manifestDesc, manifestContent, err := oras.FetchBytes(ctx, src, reference, fetchOpts)
if err != nil {
return ocispec.Descriptor{}, err
}
Expand Down

0 comments on commit 98e2ee2

Please sign in to comment.