mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 07:10:41 -08:00
fix(db): fix javadb downloading error handling (#7642)
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
This commit is contained in:
@@ -104,10 +104,10 @@ func (u *Updater) downloadDB(ctx context.Context) error {
|
|||||||
Quiet: u.quiet,
|
Quiet: u.quiet,
|
||||||
}
|
}
|
||||||
if err := artifacts.Download(ctx, u.dbDir, downloadOpt); err != nil {
|
if err := artifacts.Download(ctx, u.dbDir, downloadOpt); err != nil {
|
||||||
return xerrors.Errorf("failed to download vulnerability DB: %w", err)
|
return xerrors.Errorf("failed to download Java DB: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return xerrors.New("failed to download Java DB from any source")
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Init(cacheDir string, javaDBRepositories []name.Reference, skip, quiet bool, registryOption ftypes.RegistryOptions) {
|
func Init(cacheDir string, javaDBRepositories []name.Reference, skip, quiet bool, registryOption ftypes.RegistryOptions) {
|
||||||
|
|||||||
Reference in New Issue
Block a user