github.com/kastenhq/syft@v0.0.0-20230821225854-0710af25cdbe/cmd/syft/cli/options/verbose.go (about) 1 package options 2 3 import ( 4 "github.com/kastenhq/syft/internal" 5 "github.com/kastenhq/syft/internal/config" 6 "github.com/kastenhq/syft/internal/log" 7 ) 8 9 func IsVerbose(app *config.Application) (result bool) { 10 isPipedInput, err := internal.IsPipedInput() 11 if err != nil { 12 // since we can't tell if there was piped input we assume that there could be to disable the ETUI 13 log.Warnf("unable to determine if there is piped input: %+v", err) 14 return true 15 } 16 // verbosity should consider if there is piped input (in which case we should not show the ETUI) 17 return app.Verbosity > 0 || isPipedInput 18 }