Skip to content

Commit 196fcc1

Browse files
committed
Add warning to 'rush check' when working with mismatched variants
1 parent 03b978d commit 196fcc1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎apps/rush-lib/src/cli/actions/CheckAction.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
22
// See LICENSE in the project root for license information.
33

4+
import * as colors from 'colors';
45
import { RushCommandLineParser } from '../RushCommandLineParser';
56
import { BaseRushAction } from './BaseRushAction';
67
import { VersionMismatchFinder } from '../../api/VersionMismatchFinder';
@@ -27,6 +28,15 @@ export class CheckAction extends BaseRushAction {
2728
}
2829

2930
protected run(): Promise<void> {
31+
const variant: Variants.IVariantName = this.rushConfiguration.currentInstalledVariant();
32+
33+
if (!this._variant.value && variant) {
34+
console.log(colors.yellow(
35+
`Variant '${variant}' has been installed, but 'rush check' is currently checking the default variant. ` +
36+
`Use 'rush check --variant '${ variant }' to check the current installation.`
37+
));
38+
}
39+
3040
VersionMismatchFinder.rushCheck(this.rushConfiguration, {
3141
variant: this._variant.value
3242
});

0 commit comments

Comments
 (0)