mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
updating based on courts review
This commit is contained in:
parent
20b5c4dca2
commit
78c124c0ac
1 changed files with 7 additions and 3 deletions
|
@ -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`;
|
||||
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue