Skip to content

Commit 7045be0

Browse files
authored
Merge pull request microsoft#1744 from D4N14L/danade/fixBrokenInit
Move RushConfiguration access in action to unblock Init
2 parents 63dfae0 + 2e0a970 commit 7045be0

2 files changed

Lines changed: 17 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) {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush",
5+
"comment": "",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush",
10+
"email": "3473356+D4N14L@users.noreply.github.com"
11+
}

0 commit comments

Comments
 (0)