diff --git a/dist/index.js b/dist/index.js index c9dbaaf..29ff4fe 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/src/install-pnpm/run.ts b/src/install-pnpm/run.ts index e9a8495..b0a2a3c 100644 --- a/src/install-pnpm/run.ts +++ b/src/install-pnpm/run.ts @@ -1,5 +1,5 @@ import { addPath, exportVariable } from '@actions/core' -import { spawn, spawnSync } from 'child_process' +import { spawn } from 'child_process' import { rm, writeFile, mkdir, symlink } from 'fs/promises' import { readFileSync, existsSync } from 'fs' import path from 'path' @@ -60,15 +60,6 @@ export async function runSelfInstaller(inputs: Inputs): Promise { ? 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 }) diff --git a/src/outputs/index.ts b/src/outputs/index.ts index e25a6b0..1d64199 100644 --- a/src/outputs/index.ts +++ b/src/outputs/index.ts @@ -1,10 +1,11 @@ -import { setOutput, addPath } from '@actions/core' +import { setOutput } from '@actions/core' import { Inputs } from '../inputs' import { getBinDest } from '../utils' export function setOutputs(inputs: Inputs) { const binDest = getBinDest(inputs) - addPath(binDest) + // NOTE: addPath is already called in installPnpm — do not call it again + // here, as a second addPath would shadow the correct entry on Windows. setOutput('dest', inputs.dest) setOutput('bin_dest', binDest) }