Skip to content

Commit

Permalink
remove log and add flag description
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Nov 2, 2023
1 parent 4ec05c2 commit a72b8de
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/oras/internal/option/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package option

import (
"context"
"fmt"
"os"

"github.com/sirupsen/logrus"
Expand All @@ -37,7 +36,7 @@ type Common struct {

// ApplyFlags applies flags to a command flag set.
func (opts *Common) ApplyFlags(fs *pflag.FlagSet) {
fs.BoolVarP(&opts.Debug, "debug", "d", false, "debug mode")
fs.BoolVarP(&opts.Debug, "debug", "d", false, "output debug logs(implies --no-tty)")
fs.BoolVarP(&opts.Verbose, "verbose", "v", false, "verbose output")
fs.BoolVarP(&opts.noTTY, "no-tty", "", false, "[Preview] do not show progress output")
}
Expand All @@ -57,7 +56,6 @@ func (opts *Common) Parse() error {
func (opts *Common) parseTTY(f *os.File) error {
if !opts.noTTY {
if opts.Debug {
fmt.Println("overwiting --no-tty to true since --debug is set")
opts.noTTY = true
} else if term.IsTerminal(int(f.Fd())) {
opts.TTY = f
Expand Down

0 comments on commit a72b8de

Please sign in to comment.