From a72b8de70ae238d8e9c537ca3ef18a4fb9232849 Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Thu, 2 Nov 2023 08:13:53 +0000 Subject: [PATCH] remove log and add flag description Signed-off-by: Billy Zha --- cmd/oras/internal/option/common.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/oras/internal/option/common.go b/cmd/oras/internal/option/common.go index 1b416dd5c..05aad81e8 100644 --- a/cmd/oras/internal/option/common.go +++ b/cmd/oras/internal/option/common.go @@ -17,7 +17,6 @@ package option import ( "context" - "fmt" "os" "github.com/sirupsen/logrus" @@ -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") } @@ -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