Skip to content

Commit 3e034e6

Browse files
committed
fix(composer): should ignore empty version package
1 parent d650a7c commit 3e034e6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

module/composer/composer.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ func (Inspector) InspectProject(ctx context.Context) error {
6161
}
6262
pkgs = append(pkgs, vendorScan(ctx, filepath.Join(dir, "vendor"))...)
6363
for _, it := range pkgs {
64-
if isVersionConstrain(it.Version) {
65-
if v := lockfilePkgs[it.Name]; v.Version != "" && !isVersionConstrain(it.Version) {
66-
continue
67-
}
64+
if it.Version == "" || isVersionConstrain(it.Version) {
65+
continue
6866
}
6967
lockfilePkgs[it.Name] = it
7068
}

0 commit comments

Comments
 (0)