mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 22:12:28 +01:00
19 lines
595 B
Go
19 lines
595 B
Go
package options
|
|
|
|
import (
|
|
"github.com/anchore/syft/internal"
|
|
"github.com/anchore/syft/internal/config"
|
|
"github.com/anchore/syft/internal/log"
|
|
)
|
|
|
|
func IsVerbose(app *config.Application) (result bool) {
|
|
isPipedInput, err := internal.IsPipedInput()
|
|
if err != nil {
|
|
// since we can't tell if there was piped input we assume that there could be to disable the ETUI
|
|
log.Warnf("unable to determine if there is piped input: %+v", err)
|
|
return true
|
|
}
|
|
// verbosity should consider if there is piped input (in which case we should not show the ETUI)
|
|
return app.Verbosity > 0 || isPipedInput
|
|
}
|