mirror of
https://github.com/deployphp/action.git
synced 2024-11-26 21:59:02 +00:00
Refactor error
This commit is contained in:
parent
77ac0bfc15
commit
6c596fa80d
7
index.js
7
index.js
@ -64,12 +64,15 @@ async function dep() {
|
|||||||
dep = 'deployer.phar'
|
dep = 'deployer.phar'
|
||||||
}
|
}
|
||||||
|
|
||||||
let p = execa.command(`php ${dep} --ansi -v ${core.getInput('dep')}`)
|
let cmd = core.getInput('dep')
|
||||||
|
|
||||||
|
let p = execa.command(`php ${dep} --ansi -v ${cmd}`)
|
||||||
p.stdout.pipe(process.stdout)
|
p.stdout.pipe(process.stdout)
|
||||||
p.stderr.pipe(process.stderr)
|
p.stderr.pipe(process.stderr)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await p
|
await p
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.setFailed(err.shortMessage)
|
core.setFailed(`Failed: dep ${cmd}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user