mirror of
https://github.com/pnpm/action-setup.git
synced 2026-05-14 22:33:32 +08:00
setOutputs called addPath(node_modules/.bin) AFTER installPnpm had already added the correct path (@pnpm/exe on Windows). Since GITHUB_PATH entries are prepended, .bin ended up first in PATH, causing PowerShell to find npm's broken shims instead of pnpm.exe.
14 lines
444 B
TypeScript
14 lines
444 B
TypeScript
import { setOutput } from '@actions/core'
|
|
import { Inputs } from '../inputs'
|
|
import { getBinDest } from '../utils'
|
|
|
|
export function setOutputs(inputs: Inputs) {
|
|
const binDest = getBinDest(inputs)
|
|
// 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)
|
|
}
|
|
|
|
export default setOutputs
|