mirror of
https://github.com/pnpm/action-setup.git
synced 2026-04-03 19:00:10 +08:00
debug: log pnpm --version output during setup
This commit is contained in:
214
dist/index.js
vendored
214
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
import { addPath, exportVariable } from '@actions/core'
|
||||
import { spawn } from 'child_process'
|
||||
import { spawn, spawnSync } from 'child_process'
|
||||
import { rm, writeFile, mkdir, symlink } from 'fs/promises'
|
||||
import { readFileSync, existsSync } from 'fs'
|
||||
import path from 'path'
|
||||
@@ -60,6 +60,15 @@ export async function runSelfInstaller(inputs: Inputs): Promise<number> {
|
||||
? path.join(dest, 'node_modules', '@pnpm', 'exe', process.platform === 'win32' ? 'pnpm.exe' : 'pnpm')
|
||||
: path.join(dest, 'node_modules', 'pnpm', 'bin', 'pnpm.mjs')
|
||||
|
||||
// Verify pnpm is callable
|
||||
console.log(`Verifying pnpm at: ${bootstrapPnpm}`)
|
||||
console.log(`File exists: ${existsSync(bootstrapPnpm)}`)
|
||||
const verify = spawnSync(bootstrapPnpm, ['--version'], { encoding: 'utf8', timeout: 15000 })
|
||||
console.log(`pnpm --version stdout: ${JSON.stringify(verify.stdout)}`)
|
||||
console.log(`pnpm --version stderr: ${JSON.stringify(verify.stderr)}`)
|
||||
console.log(`pnpm --version status: ${verify.status}`)
|
||||
if (verify.error) console.log(`pnpm --version error: ${verify.error}`)
|
||||
|
||||
// Determine the target version
|
||||
const targetVersion = readTargetVersion({ version, packageJsonFile })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user