mirror of
https://github.com/pnpm/action-setup.git
synced 2026-04-03 10:50:12 +08:00
fix: add PNPM_HOME/bin to PATH on all platforms
This commit is contained in:
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -43,9 +43,11 @@ export async function runSelfInstaller(inputs: Inputs): Promise<number> {
|
||||
addPath(pnpmHome)
|
||||
exportVariable('PNPM_HOME', pnpmHome)
|
||||
|
||||
// pnpm expects PNPM_HOME/bin in PATH for global binaries
|
||||
addPath(path.join(pnpmHome, 'bin'))
|
||||
|
||||
// Ensure pnpm bin link exists — npm ci sometimes doesn't create it
|
||||
if (process.platform !== 'win32') {
|
||||
addPath(path.join(pnpmHome, 'bin'))
|
||||
const pnpmBinLink = path.join(dest, 'node_modules', '.bin', 'pnpm')
|
||||
if (!existsSync(pnpmBinLink)) {
|
||||
await mkdir(path.join(dest, 'node_modules', '.bin'), { recursive: true })
|
||||
|
||||
Reference in New Issue
Block a user