Skip to content

Commit 69b98be

Browse files
authored
Fix the issue with accessing the shouldEnsureConsistentVersions method. (#5063)
1 parent 7aa7b9f commit 69b98be

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush",
5+
"comment": "Fix an issue with evaluation of `shouldEnsureConsistentVersions` when the value is not constant across subspaces or variants.",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush"
10+
}

libraries/rush-lib/src/cli/actions/VersionAction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ export class VersionAction extends BaseRushAction {
216216
// Validate result of all subspaces
217217
for (const subspace of rushConfig.subspaces) {
218218
// Respect the `ensureConsistentVersions` field in rush.json
219-
if (!subspace.shouldEnsureConsistentVersions) {
220-
return;
219+
if (!subspace.shouldEnsureConsistentVersions(variant)) {
220+
continue;
221221
}
222222

223223
const mismatchFinder: VersionMismatchFinder = VersionMismatchFinder.getMismatches(rushConfig, {

0 commit comments

Comments
 (0)