Skip to content

Commit

Permalink
Merge pull request microsoft#4026 from iclanton/fix-plugin-installation
Browse files Browse the repository at this point in the history
[rush] Fix an issue where rush plugin autoinstallers would fail to install because the Rush global folder had not yet been initialized.
  • Loading branch information
iclanton authored Mar 22, 2023
2 parents f4626cc + 0ace1a5 commit 2e36264
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Fix an issue where rush plugin autoinstallers would fail to install because the Rush global folder had not yet been initialized.",
"type": "none"
}
],
"packageName": "@microsoft/rush"
}
6 changes: 3 additions & 3 deletions libraries/rush-lib/src/cli/RushCommandLineParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface IRushCommandLineParserOptions {

export class RushCommandLineParser extends CommandLineParser {
public telemetry: Telemetry | undefined;
public rushGlobalFolder!: RushGlobalFolder;
public rushGlobalFolder: RushGlobalFolder;
public readonly rushConfiguration!: RushConfiguration;
public readonly rushSession: RushSession;
public readonly pluginManager: PluginManager;
Expand Down Expand Up @@ -127,6 +127,8 @@ export class RushCommandLineParser extends CommandLineParser {
rushConfiguration: this.rushConfiguration
});

this.rushGlobalFolder = new RushGlobalFolder();

this.rushSession = new RushSession({
getIsDebugMode: () => this.isDebug,
terminalProvider: this._terminalProvider
Expand Down Expand Up @@ -239,8 +241,6 @@ export class RushCommandLineParser extends CommandLineParser {

private _populateActions(): void {
try {
this.rushGlobalFolder = new RushGlobalFolder();

// Alphabetical order
this.addAction(new AddAction(this));
this.addAction(new ChangeAction(this));
Expand Down

0 comments on commit 2e36264

Please sign in to comment.