fix: set failed on subprocess error

This commit is contained in:
Andrei Ioniță 2021-05-10 23:46:12 +03:00
parent 1f9078ddea
commit 75c3962435
No known key found for this signature in database
GPG key ID: 0F69C262110EDA43

View file

@ -55,5 +55,11 @@ function dep() {
dep = 'deployer.phar'
}
execa(dep, split(core.getInput('dep'))).stdout.pipe(process.stdout);
const subprocess = execa(dep, split(core.getInput('dep')))
subprocess.stdout.pipe(process.stdout);
subprocess.catch(err => {
core.setFailed(err.shortMessage)
})
}