Files
setup-pnpm/src/install-pnpm/index.ts

19 lines
529 B
TypeScript
Raw Normal View History

2020-05-09 21:50:47 +07:00
import { setFailed, startGroup, endGroup } from '@actions/core'
2020-05-08 13:06:16 +07:00
import { Inputs } from '../inputs'
2020-05-08 11:29:39 +07:00
import runSelfInstaller from './run'
export { runSelfInstaller }
export async function install(inputs: Inputs): Promise<string | undefined> {
2020-05-09 21:50:47 +07:00
startGroup('Running self-installer...')
const { exitCode, binDest } = await runSelfInstaller(inputs)
2020-05-09 21:50:47 +07:00
endGroup()
if (exitCode) {
setFailed(`Something went wrong, self-installer exits with code ${exitCode}`)
return undefined
2020-05-08 11:29:39 +07:00
}
return binDest
2020-05-08 11:29:39 +07:00
}
export default install