From 192f5a4fca697a8d8f529ec2415bf2af02847ef4 Mon Sep 17 00:00:00 2001 From: Jeff Posnick Date: Mon, 31 Jul 2017 14:28:54 -0400 Subject: [PATCH] Gulp won't fail a task due to Promise.reject() --- gulp-tasks/jekyll.js | 2 +- gulp-tasks/reference-docs.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gulp-tasks/jekyll.js b/gulp-tasks/jekyll.js index 96a58e1..5a9c16b 100644 --- a/gulp-tasks/jekyll.js +++ b/gulp-tasks/jekyll.js @@ -44,7 +44,7 @@ const runJekyllCommand = (command, additionalParams) => { if (code === 0) { resolve(); } else { - reject(); + reject(`Error ${code} returned from: jekyll ${params.join(' ')}`); } }); }); diff --git a/gulp-tasks/reference-docs.js b/gulp-tasks/reference-docs.js index 92d1753..d2f6ff6 100644 --- a/gulp-tasks/reference-docs.js +++ b/gulp-tasks/reference-docs.js @@ -21,13 +21,14 @@ const downloadTaggedRelease = (tagName) => { const docPath = path.join(TMP_PATH, tagName); return new Promise((resolve, reject) => { - const gitDownload = spawn('git', [ + const params = [ 'clone', '--branch', tagName, '--depth', '1', `http://${GIT_REPO}.git`, docPath, - ], { + ]; + const gitDownload = spawn('git', params, { stdio: 'inherit', }); @@ -40,7 +41,7 @@ const downloadTaggedRelease = (tagName) => { if (code === 0) { resolve(docPath); } else { - reject(); + reject(`Error ${code} returned from: git ${params.join(' ')}`); } }); });