Skip to content

Commit 87975b7

Browse files
committed
fix(pinned): workspace:* was wrongly marked as pin mismatch
1 parent 700a4c8 commit 87975b7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/visit_packages.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ pub fn visit_packages(ctx: Context) -> Context {
237237
instance.mark_suspect(RefuseToPinLocal);
238238
return;
239239
}
240+
if instance.already_equals(&pinned_specifier) {
241+
debug!(" it is identical to the pinned version");
242+
debug!(" mark as valid");
243+
instance.mark_valid(IsIdenticalToPin, &pinned_specifier);
244+
return;
245+
}
240246
debug!(" it depends on the local instance");
241247
debug!(" its version number (without a range):");
242248
if !instance.actual_specifier.has_same_version_number_as(&pinned_specifier) {
@@ -263,15 +269,9 @@ pub fn visit_packages(ctx: Context) -> Context {
263269
return;
264270
}
265271
debug!(" it is not in a semver group which prefers a different semver range to the pinned version");
266-
if instance.already_equals(&pinned_specifier) {
267-
debug!(" it is identical to the pinned version");
268-
debug!(" mark as valid");
269-
instance.mark_valid(IsIdenticalToPin, &pinned_specifier);
270-
} else {
271-
debug!(" it differs to the pinned version");
272-
debug!(" mark as error");
273-
instance.mark_fixable(DiffersToPin, &pinned_specifier);
274-
}
272+
debug!(" it differs to the pinned version");
273+
debug!(" mark as error");
274+
instance.mark_fixable(DiffersToPin, &pinned_specifier);
275275
});
276276
}
277277
VersionGroupVariant::SameRange => {

0 commit comments

Comments
 (0)