mirror of
https://code.forgejo.org/pnpm/action-setup.git
synced 2025-05-18 20:44:44 +00:00
Rename install to install-pnpm
This commit is contained in:
parent
6fe65dc1af
commit
9a1617cf46
4 changed files with 3 additions and 3 deletions
|
@ -1,26 +0,0 @@
|
|||
import { spawn } from 'child_process'
|
||||
import { execPath } from 'process'
|
||||
import { downloadSelfInstaller } from '../self-installer'
|
||||
import { Inputs } from '../inputs'
|
||||
|
||||
export async function runSelfInstaller(inputs: Inputs): Promise<number> {
|
||||
const cp = spawn(execPath, {
|
||||
env: {
|
||||
PNPM_VERSION: inputs.version,
|
||||
PNPM_DEST: inputs.dest,
|
||||
PNPM_BIN_DEST: inputs.binDest,
|
||||
PNPM_REGISTRY: inputs.registry,
|
||||
},
|
||||
stdio: ['pipe', 'inherit', 'inherit'],
|
||||
})
|
||||
|
||||
const response = await downloadSelfInstaller()
|
||||
response.body.pipe(cp.stdin)
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
cp.on('error', reject)
|
||||
cp.on('close', resolve)
|
||||
})
|
||||
}
|
||||
|
||||
export default runSelfInstaller
|
Loading…
Add table
Add a link
Reference in a new issue