Skip to content
This repository has been archived by the owner on Apr 25, 2018. It is now read-only.

Commit

Permalink
Merge pull request #91 from GoogleChrome/gulp-reject-with-message
Browse files Browse the repository at this point in the history
Add a rejection value to our promise-spawn-wrapper error handling
  • Loading branch information
jeffposnick committed Jul 31, 2017
2 parents fc39d11 + f594b14 commit eed46b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gulp-tasks/jekyll.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const runJekyllCommand = (command, additionalParams) => {
if (code === 0) {
resolve();
} else {
reject();
reject(`Error ${code} returned from: jekyll ${params.join(' ')}`);
}
});
});
Expand Down
7 changes: 4 additions & 3 deletions gulp-tasks/reference-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});

Expand All @@ -40,7 +41,7 @@ const downloadTaggedRelease = (tagName) => {
if (code === 0) {
resolve(docPath);
} else {
reject();
reject(`Error ${code} returned from: git ${params.join(' ')}`);
}
});
});
Expand Down

0 comments on commit eed46b0

Please sign in to comment.