Skip to content

Commit

Permalink
fix blob delete and login
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Aug 18, 2023
1 parent c706fb6 commit db9a803
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/oras/root/blob/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ Example - Delete a blob and print its descriptor:
}

func deleteBlob(ctx context.Context, opts deleteBlobOptions) (err error) {
ctx, _ = opts.WithContext(ctx)
repo, err := opts.NewRepository(opts.targetRef, nil, opts.Common)
ctx, logger := opts.WithContext(ctx)
repo, err := opts.NewRepository(opts.targetRef, logger.Warn, opts.Common)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/oras/root/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Example - Log in with username and password in an interactive terminal and no TL
}

func runLogin(ctx context.Context, opts loginOptions) (err error) {
ctx, _ = opts.WithContext(ctx)
ctx, logger := opts.WithContext(ctx)

// prompt for credential
if opts.Password == "" {
Expand Down Expand Up @@ -108,7 +108,7 @@ func runLogin(ctx context.Context, opts loginOptions) (err error) {
if err != nil {
return err
}
remote, err := opts.Remote.NewRegistry(opts.Hostname, nil, opts.Common)
remote, err := opts.Remote.NewRegistry(opts.Hostname, logger.Warn, opts.Common)
if err != nil {
return err
}
Expand Down

0 comments on commit db9a803

Please sign in to comment.