2 Commits

Author SHA1 Message Date
Zoltan Kochan
e6378df420 PNPM_HOME_PATH=>PNPM_HOME 2022-02-08 00:21:53 +02:00
Zoltan Kochan
6ff6e97bc6 The pnpm home directory should be added to PATH and PNPM_HOME
This change is needed to make the action compatible with pnpm v7.

Related breaking change in pnpm: pnpm/pnpm#4280
2022-02-07 23:15:44 +02:00

View File

@@ -23,16 +23,16 @@ export async function runSelfInstaller(inputs: Inputs): Promise<number> {
const response = await fetch('https://pnpm.js.org/pnpm.js')
response.body.pipe(cp.stdin)
const result = await new Promise<number>((resolve, reject) => {
const exitCode = await new Promise<number>((resolve, reject) => {
cp.on('error', reject)
cp.on('close', resolve)
})
if (result === 0) {
if (exitCode === 0) {
const pnpmHome = join(dest, 'node_modules/.bin')
core.addPath(pnpmHome)
core.exportVariable('PNPM_HOME_PATH', pnpmHome)
core.exportVariable('PNPM_HOME', pnpmHome)
}
return result
return exitCode
}
export default runSelfInstaller