Try using execFile

This commit is contained in:
Federico Grandi
2020-05-01 11:26:05 +02:00
parent f0fcdb07a3
commit 9cd727829f

View File

@@ -1,11 +1,11 @@
import { info, setFailed, getInput, warning } from '@actions/core' import { info, setFailed, getInput, warning } from '@actions/core'
import { join as path } from 'path' import { join as path } from 'path'
import { execFileSync } from 'child_process' import { execFile } from 'child_process'
try { try {
checkInputs() checkInputs()
const output = execFileSync(path(__dirname, 'entrypoint.sh')) execFile(path(__dirname, 'entrypoint.sh'))
info(output.toString()) .stdout?.on('data', data => info(data.toString()))
} catch (err) { } catch (err) {
console.error(err) console.error(err)
setFailed(err instanceof Error ? err.message : err) setFailed(err instanceof Error ? err.message : err)