setup-pnpm/src/index.ts

19 lines
459 B
TypeScript
Raw Normal View History

2020-05-08 14:44:22 +08:00
import { inspect } from 'util'
import { setFailed, warning } from '@actions/core'
2020-05-08 14:06:16 +08:00
import getInputs from './inputs'
2020-05-08 14:12:01 +08:00
import setOutputs from './outputs'
2020-05-08 14:06:16 +08:00
import install from './install'
2020-05-08 14:44:22 +08:00
warning(`EXEC_PATH ${process.execPath}`)
warning(`EXEC_ARGV ${inspect(process.execArgv)}`)
2020-05-08 14:06:16 +08:00
const inputs = getInputs()
install(inputs).then(() => {
console.log('Installation Completed!')
2020-05-08 14:12:01 +08:00
setOutputs(inputs)
2020-05-08 14:06:16 +08:00
}).catch(error => {
console.error(error)
setFailed(error)
})