From 6c596fa80d7c8cffd85eb54d4f37712e123eb1f8 Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Fri, 15 Oct 2021 23:20:14 +0200 Subject: [PATCH] Refactor error --- index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e648771..e96996d 100644 --- a/index.js +++ b/index.js @@ -64,12 +64,15 @@ async function dep() { 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.stderr.pipe(process.stderr) + try { await p } catch (err) { - core.setFailed(err.shortMessage) + core.setFailed(`Failed: dep ${cmd}`) } }