From e7d1e31573ec44bfd5fa70fec575d7fa325dd41b Mon Sep 17 00:00:00 2001 From: Anton Wilhelm Date: Mon, 7 Dec 2015 12:04:51 +0100 Subject: [PATCH] fix #20 and comments of #22 always handle error argument in a callback --- bin/gh-pages | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/gh-pages b/bin/gh-pages index 31243e1..9b25895 100755 --- a/bin/gh-pages +++ b/bin/gh-pages @@ -27,6 +27,10 @@ ghpages.publish(path.join(process.cwd(), program.dist), { logger: function(message) { console.log(message); } -}, function() { +}, function(err) { + if (err != null) { + console.log(err) + return process.exit(1); + } console.log('Published'); });