mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 23:26:39 -08:00
refactor: pass DB dir to trivy-db (#7057)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
This commit is contained in:
@@ -76,7 +76,7 @@ func cleanScanCache(ctx context.Context, opts flag.Options) error {
|
||||
|
||||
func cleanVulnerabilityDB(ctx context.Context, opts flag.Options) error {
|
||||
log.InfoContext(ctx, "Removing vulnerability database...")
|
||||
if err := db.NewClient(opts.CacheDir, true).Clear(ctx); err != nil {
|
||||
if err := db.NewClient(db.Dir(opts.CacheDir), true).Clear(ctx); err != nil {
|
||||
return xerrors.Errorf("clear vulnerability database: %w", err)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user