Skip to content

Commit a3ba10c

Browse files
committed
Move RushConfiguration access in action to unblock Init
1 parent 63dfae0 commit a3ba10c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

apps/rush-lib/src/cli/actions/PublishAction.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ export class PublishAction extends BaseRushAction {
6666
'changes and publish packages, you must use the --commit flag and/or the --publish flag.',
6767
parser
6868
});
69-
70-
// Example: "common\temp\publish-home"
71-
this._targetNpmrcPublishFolder = path.join(this.rushConfiguration.commonTempFolder, 'publish-home');
72-
73-
// Example: "common\temp\publish-home\.npmrc"
74-
this._targetNpmrcPublishPath = path.join(this._targetNpmrcPublishFolder, '.npmrc');
7569
}
7670

7771
protected onDefineParameters(): void {
@@ -211,6 +205,12 @@ export class PublishAction extends BaseRushAction {
211205
return Promise.resolve().then(() => {
212206
PolicyValidator.validatePolicy(this.rushConfiguration, false);
213207

208+
// Example: "common\temp\publish-home"
209+
this._targetNpmrcPublishFolder = path.join(this.rushConfiguration.commonTempFolder, 'publish-home');
210+
211+
// Example: "common\temp\publish-home\.npmrc"
212+
this._targetNpmrcPublishPath = path.join(this._targetNpmrcPublishFolder, '.npmrc');
213+
214214
const allPackages: Map<string, RushConfigurationProject> = this.rushConfiguration.projectsByName;
215215

216216
if (this._regenerateChangelogs.value) {

0 commit comments

Comments
 (0)