From 42b84c134c7bdfa26d6f07bd78537ba7fe33ebb2 Mon Sep 17 00:00:00 2001 From: Flummi Date: Sun, 23 Oct 2016 00:10:45 +0200 Subject: [PATCH] verbose output if debug is activated --- src/trigger/gitpull.js | 6 ++++-- src/websrv.js | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/trigger/gitpull.js b/src/trigger/gitpull.js index 07f813c..616010f 100644 --- a/src/trigger/gitpull.js +++ b/src/trigger/gitpull.js @@ -9,8 +9,10 @@ module.exports = (lib) => { func: (e) => { exec('cd ../../ & git pull', (error, stdout) => { if(error === null) { - e.reply( 'git pull suxxessfully.' ); - //e.reply(stdout); + if(!lib.debug) + e.reply('git pull suxxessfully.'); + else + lib.log(stdout); } }); }, diff --git a/src/websrv.js b/src/websrv.js index 1a63828..9ccec2e 100644 --- a/src/websrv.js +++ b/src/websrv.js @@ -46,8 +46,12 @@ function Websrv(tlib) { lib.bot.send( lib.cfg.debugchannel, eventname + ' from ' + autor + ' ('+commit+') in branch '+branch, 'n0xy' ); if( lib.cfg.debugchannel === '#f0ck' ) { exec('cd ../ & git pull', (error, stdout) => { - if(error === null) - lib.bot.send( lib.cfg.debugchannel, 'git pull suxxessfully.', 'n0xy' ); + if(error === null) { + if(!lib.debug) + lib.bot.send(lib.cfg.debugchannel, 'git pull suxxessfully.', 'n0xy'); + else + lib.log(stdout); + } }); } }