Skip to content

Commit af79a67

Browse files
committed
Fix linking on common
1 parent a0d9c9b commit af79a67

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/rush-lib/src/logic/pnpm/PnpmShrinkwrapFile.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ export class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
233233
}
234234

235235
public getShrinkwrapEntry(name: string, version: string): IPnpmShrinkwrapDependencyYaml | undefined {
236-
return this._shrinkwrapJson.packages[`/${name}/${version}`];
236+
// Version can sometimes be in the form of a path that's already in the /name/version format.
237+
const packageId: string = version.indexOf('/') !== -1
238+
? version
239+
: `/${name}/${version}`;
240+
return this._shrinkwrapJson.packages[packageId];
237241
}
238242

239243
/**

0 commit comments

Comments
 (0)