docs: link warning to both timeout config options (#6620)

This commit is contained in:
Katrin Leinweber
2024-05-06 10:26:37 +02:00
committed by GitHub
parent 2482aa74f8
commit 38e2fbf7f9
3 changed files with 3 additions and 3 deletions

View File

@@ -140,7 +140,7 @@ func Run(ctx context.Context, opt flag.Options) error {
var err error var err error
defer func() { defer func() {
if errors.Is(err, context.DeadlineExceeded) { if errors.Is(err, context.DeadlineExceeded) {
log.Warn("Increase --timeout value") log.Warn("Provide a higher timeout value, see https://aquasecurity.github.io/trivy/latest/docs/configuration/")
} }
}() }()

View File

@@ -397,7 +397,7 @@ func Run(ctx context.Context, opts flag.Options, targetKind TargetKind) (err err
defer func() { defer func() {
if errors.Is(err, context.DeadlineExceeded) { if errors.Is(err, context.DeadlineExceeded) {
log.Warn("Increase --timeout value") log.Warn("Provide a higher timeout value, see https://aquasecurity.github.io/trivy/latest/docs/configuration/")
} }
}() }()

View File

@@ -39,7 +39,7 @@ func Run(ctx context.Context, args []string, opts flag.Options) error {
defer func() { defer func() {
cancel() cancel()
if errors.Is(err, context.DeadlineExceeded) { if errors.Is(err, context.DeadlineExceeded) {
log.WarnContext(ctx, "Increase --timeout value") log.WarnContext(ctx, "Provide a higher timeout value, see https://aquasecurity.github.io/trivy/latest/docs/configuration/")
} }
}() }()
opts.K8sVersion = cluster.GetClusterVersion() opts.K8sVersion = cluster.GetClusterVersion()