From 36e45d4a26a3b6151b314653d64cc3c4e5cf8ece Mon Sep 17 00:00:00 2001 From: lub Date: Sat, 14 Oct 2017 22:08:26 +0200 Subject: [PATCH] add missing semicolons --- index.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index b3fe953..4c869f4 100644 --- a/index.js +++ b/index.js @@ -36,18 +36,18 @@ function remoterun(command, args) { ssh.execCommand('/usr/bin/sudo -- ' + command, {cwd: config.infrastructure}) .then(function(result) { if(result.code === 0) { - resolve(result) + resolve(result); } else { - reject(result) + reject(result); } }, function(result) { - reject(result) + reject(result); }) }, function(result) { reject(result) - }) - }) -} + }); + }); +}; const commands = {}; @@ -60,14 +60,14 @@ commands['rebuild'].exec = function(args, room, event) { matrixclient.sendNotice(room.roomId, 'rebuilding container ' + container); - remoterun('./rebuild.sh ' + container) + remoterun('./rebuild.sh ' + container); .then(function(result) { matrixclient.sendNotice(room.roomId, event.sender.userId + '\nrebuilt container ' + container); }, function(result) { matrixclient.sendNotice(room.roomId, event.sender.userId + '\nrebuild of container ' + container + ' failed.\ncode: ' + result.code + '\nstdout: \n```\n' + result.stdout + '```\nstderr: \n```\n' + result.stderr + '\n```'); - }) + }); -} +}; matrixclient.on('Room.timeline', function(event, room, resettimeline) {