Skip to content

Commit 0c6dc86

Browse files
authored
move timestamp up such that it is not skipped (#2046)
Signed-off-by: pxp928 <[email protected]>
1 parent a0762a6 commit 0c6dc86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/handler/collector/deps_dev/deps_dev.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,9 @@ func (d *depsCollector) fetchDependencies(ctx context.Context, purl string, docC
556556
func (d *depsCollector) collectAdditionalMetadata(ctx context.Context, pkgType string, namespace *string, name string, version *string, pkgComponent *PackageComponent) error {
557557
logger := logging.FromContext(ctx)
558558

559+
// add time when data was obtained
560+
pkgComponent.UpdateTime = time.Now().UTC()
561+
559562
// skip all type guac as they are generated by guac and will not be found in deps.dev
560563
if pkgType == "guac" {
561564
return fmt.Errorf("guac purl, skipping deps.dev query: %s", strings.Join([]string{pkgType, *namespace, name}, "/"))
@@ -634,9 +637,6 @@ func (d *depsCollector) collectAdditionalMetadata(ctx context.Context, pkgType s
634637
}
635638
}
636639

637-
// add time when data was obtained
638-
pkgComponent.UpdateTime = time.Now().UTC()
639-
640640
return nil
641641
}
642642

0 commit comments

Comments
 (0)