Restore previously installed pnpm version (#35389)
This commit is contained in:
parent
613be5a990
commit
20bb576fb6
|
@ -70,6 +70,9 @@ export const scanForChanges = async (
|
||||||
);
|
);
|
||||||
const packageJSON = JSON.parse( fileStr );
|
const packageJSON = JSON.parse( fileStr );
|
||||||
|
|
||||||
|
// Temporarily save the current PNPM version.
|
||||||
|
await execAsync( `tmpgPNPM="$(pnpm --version)"` );
|
||||||
|
|
||||||
if ( packageJSON.engines && packageJSON.engines.pnpm ) {
|
if ( packageJSON.engines && packageJSON.engines.pnpm ) {
|
||||||
await execAsync(
|
await execAsync(
|
||||||
`npm i -g pnpm@${ packageJSON.engines.pnpm }`,
|
`npm i -g pnpm@${ packageJSON.engines.pnpm }`,
|
||||||
|
@ -101,6 +104,9 @@ export const scanForChanges = async (
|
||||||
|
|
||||||
schemaChanges = schemaDiff || [];
|
schemaChanges = schemaDiff || [];
|
||||||
|
|
||||||
|
// Restore the previously saved PNPM version
|
||||||
|
await execAsync( `npm i -g pnpm@"$tmpgPNPM"` );
|
||||||
|
|
||||||
Logger.endTask();
|
Logger.endTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue