From 3322e0d482808fe94c682bc7549d92eb979d8b85 Mon Sep 17 00:00:00 2001 From: koeneijkemans Date: Sun, 5 Jul 2020 08:42:39 +0200 Subject: [PATCH] add some logging --- index.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 09a2a9b..80df052 100644 --- a/index.js +++ b/index.js @@ -4,6 +4,10 @@ const execlib = require('@actions/exec'); try { const branchName = getBranchName(); core.setOutput("branchname", branchName); + + if (branchName) { + console.log('We got it! : ' + branchName); + } } catch (error) { core.setFailed(error.message); } @@ -12,11 +16,18 @@ async function getBranchName() { let output = ''; const options = { listeners: { - stdout: (data) => output += data.toString() + stdout: (data) => { + output += data.toString(); + console.log(data); + } } }; await execlib.exec('git', ['branch'], options); + if (output) { + console.log('Got some sweet output...' + output); + } + return output; } \ No newline at end of file