summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Cole <dave@developmentseed.org>2013-06-19 11:41:21 -0400
committerDave Cole <dave@developmentseed.org>2013-06-19 11:41:21 -0400
commit231c93dca8c899ebf9ce7d780fcad6f0fe27d7eb (patch)
tree2deb0cfed69958a252b781bbfaebd82eaa53aa82
parent49f91efad6d6cb168a6c7314454aea1f533a4f02 (diff)
Add callbacks to early exit functions
-rwxr-xr-xjekyll-hook.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/jekyll-hook.js b/jekyll-hook.js
index b78fc59..5154fd6 100755
--- a/jekyll-hook.js
+++ b/jekyll-hook.js
@@ -32,12 +32,14 @@ app.post('/hooks/jekyll/:branch', function(req, res) {
// End early if not permitted account
if (config.accounts.indexOf(data.owner) === -1) {
console.log(data.owner + ' is not an authorized account.');
+ if (typeof cb === 'function') cb();
return;
}
// End early if not permitted branch
if (data.branch !== branch) {
console.log('Not ' + branch + ' branch.');
+ if (typeof cb === 'function') cb();
return;
}