Skip to content

Commit

Permalink
fix + minor refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
  • Loading branch information
Wwwsylvia committed Nov 29, 2024
1 parent ffe1ae5 commit 58559fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cmd/oras/internal/output/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ import (
// Printer prints for status handlers.
type Printer struct {
Verbose bool
out io.Writer
err io.Writer
lock sync.Mutex

out io.Writer
err io.Writer
lock sync.Mutex
}

// NewPrinter creates a new Printer.
Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/root/manifest/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Example - Push a manifest to an OCI image layout folder 'layout-dir' and tag wit
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 && !opts.OutputDescriptor
return pushManifest(cmd, opts)
},
}
Expand Down

0 comments on commit 58559fd

Please sign in to comment.