Skip to content

Commit 67625c1

Browse files
author
Nick Pape
committed
Get the NPM Link Manager working properly
1 parent cd0a771 commit 67625c1

6 files changed

Lines changed: 370 additions & 348 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export default class GenerateAction extends BaseRushAction {
148148
console.log(os.EOL + colors.green(`Rush generate finished successfully. (${stopwatch.toString()})`));
149149

150150
if (!this._noLinkParameter.value) {
151-
const linkManager: LinkManager = new LinkManager(this.rushConfiguration);
151+
const linkManager: LinkManager = LinkManager.getLinkManager(this.rushConfiguration);
152152
// NOTE: Setting force=true here shouldn't be strictly necessary, since installCommonModules()
153153
// above should have already deleted the marker file, but it doesn't hurt to be explicit.
154154
this._parser.catchSyncErrors(linkManager.createSymlinksForProjects(true));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default class InstallAction extends BaseRushAction {
122122
this.eventHooksManager.handle(Event.postRushInstall);
123123

124124
if (!this._noLinkParameter.value) {
125-
const linkManager: LinkManager = new LinkManager(this.rushConfiguration);
125+
const linkManager: LinkManager = LinkManager.getLinkManager(this.rushConfiguration);
126126
this._parser.catchSyncErrors(linkManager.createSymlinksForProjects(false));
127127
} else {
128128
console.log(os.EOL + 'Next you should probably run: "rush link"');

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class LinkAction extends BaseRushAction {
3030
}
3131

3232
protected run(): void {
33-
const linkManager: LinkManager = new LinkManager(this.rushConfiguration);
33+
const linkManager: LinkManager = LinkManager.getLinkManager(this.rushConfiguration);
3434
this._parser.catchSyncErrors(linkManager.createSymlinksForProjects(this._force.value));
3535
}
3636
}

0 commit comments

Comments
 (0)