mirror of
https://github.com/pnpm/action-setup.git
synced 2026-03-30 23:02:36 +00:00
fix: add PNPM_HOME/bin to PATH on all platforms
This commit is contained in:
parent
8cb9261afe
commit
825c5d3936
BIN
dist/index.js
vendored
BIN
dist/index.js
vendored
Binary file not shown.
@ -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 })
|
||||
|
||||
Loading…
Reference in New Issue
Block a user