From 026d0a5cdda0a41be73b7a2f8a12a8ba22afdfa8 Mon Sep 17 00:00:00 2001 From: Raju Mandapati Date: Mon, 4 Jun 2018 12:14:36 -0500 Subject: [PATCH] fix(upload): adding correct arguments for upload callback Fixes https://github.com/kraken-io/gulp-kraken/issues/9 --- index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index fa7f234..2ac445b 100644 --- a/index.js +++ b/index.js @@ -66,7 +66,11 @@ module.exports = function (options) { wait: true }; - kraken.upload(opts, function (data) { + kraken.upload(opts, function (err, data) { + if(err) { + return cb(new gutil.PluginError("gulp-kraken:", err)); + } + if (!data.success) { return cb(new gutil.PluginError("gulp-kraken:", data.message)); } @@ -103,4 +107,4 @@ module.exports = function (options) { gutil.log("gulp-kraken:", msg); cb(); }); -}; \ No newline at end of file +};