@@ -17,7 +17,7 @@ import {
17
17
type IPackageJsonUpdaterRushAddOptions ,
18
18
SemVerStyle
19
19
} from '../../logic/PackageJsonUpdaterTypes' ;
20
- import { getVariant , VARIANT_PARAMETER } from '../../api/Variants' ;
20
+ import { getVariantAsync , VARIANT_PARAMETER } from '../../api/Variants' ;
21
21
22
22
export class AddAction extends BaseAddAndRemoveAction {
23
23
protected readonly _allFlag : CommandLineFlagParameter ;
@@ -94,7 +94,7 @@ export class AddAction extends BaseAddAndRemoveAction {
94
94
this . _variantParameter = this . defineStringParameter ( VARIANT_PARAMETER ) ;
95
95
}
96
96
97
- public getUpdateOptions ( ) : IPackageJsonUpdaterRushAddOptions {
97
+ public async getUpdateOptionsAsync ( ) : Promise < IPackageJsonUpdaterRushAddOptions > {
98
98
const projects : RushConfigurationProject [ ] = super . getProjects ( ) ;
99
99
100
100
if ( this . _caretFlag . value && this . _exactFlag . value ) {
@@ -157,7 +157,11 @@ export class AddAction extends BaseAddAndRemoveAction {
157
157
packagesToAdd . push ( { packageName, version, rangeStyle } ) ;
158
158
}
159
159
160
- const variant : string | undefined = getVariant ( this . _variantParameter , this . rushConfiguration ) ;
160
+ const variant : string | undefined = await getVariantAsync (
161
+ this . _variantParameter ,
162
+ this . rushConfiguration ,
163
+ true
164
+ ) ;
161
165
162
166
return {
163
167
projects : projects ,
0 commit comments