mirror of
https://github.com/pnpm/action-setup.git
synced 2026-03-18 00:06:14 +08:00
debug: add logging to diagnose pnpm not found on PATH
Log .bin directory contents after npm ci to understand why pnpm binary is not found in subsequent CI steps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
78
dist/index.js
vendored
78
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -30,9 +30,24 @@ export async function runSelfInstaller(inputs: Inputs): Promise<number> {
|
||||
}
|
||||
|
||||
const pnpmHome = path.join(dest, 'node_modules', '.bin')
|
||||
console.log(`Adding to PATH: ${pnpmHome}`)
|
||||
addPath(pnpmHome)
|
||||
exportVariable('PNPM_HOME', pnpmHome)
|
||||
|
||||
// Debug: list .bin contents
|
||||
const { readdirSync, lstatSync } = await import('fs')
|
||||
try {
|
||||
const bins = readdirSync(pnpmHome)
|
||||
console.log(`.bin contents: ${bins.join(', ')}`)
|
||||
for (const bin of bins) {
|
||||
const binPath = path.join(pnpmHome, bin)
|
||||
const stat = lstatSync(binPath)
|
||||
console.log(` ${bin}: symlink=${stat.isSymbolicLink()}, mode=${stat.mode.toString(8)}`)
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(`Failed to list .bin: ${e}`)
|
||||
}
|
||||
|
||||
const bootstrapPnpm = standalone
|
||||
? path.join(dest, 'node_modules', '@pnpm', 'exe', 'pnpm')
|
||||
: path.join(dest, 'node_modules', 'pnpm', 'bin', 'pnpm.cjs')
|
||||
|
||||
Reference in New Issue
Block a user