Skip to content

Commit

Permalink
updating based on courts review
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar committed Oct 29, 2016
1 parent e58b785 commit 5dc0096
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tasks/build/download_node_builds.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function downloadNodeBuilds(grunt) {
const platforms = grunt.config.get('platforms');
const downloadLimit = 3;

let shaSums = {};
const shaSums = {};
const getShaSums = () => {
const nodeVersion = grunt.config.get('nodeVersion');
const shaSumsUri = `https://nodejs.org/dist/v${nodeVersion}/SHASUMS256.txt`;
Expand Down Expand Up @@ -82,9 +82,13 @@ export default function downloadNodeBuilds(grunt) {
let isDownloadValid = false;

await mkdirpAsync(downloadDir);
if (grunt.option('skip-download')) {
if (grunt.option('skip-node-download')) {
grunt.log.ok(`Verifying sha sum of ${platform.name}`);
isDownloadValid = await checkShaSum(platform);
if (isDownloadValid) return;
if (!isDownloadValid) {
throw new Error(`${platform.name} sha verification failed.`);
}
return;
}

while (!isDownloadValid && (downloadCounter < downloadLimit)) {
Expand Down

0 comments on commit 5dc0096

Please sign in to comment.