mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
only skipping download if --skip-download cli argument is present
This commit is contained in:
parent
955972b2b5
commit
325e17245c
1 changed files with 9 additions and 2 deletions
|
@ -5,7 +5,9 @@ import { createGunzip } from 'zlib';
|
|||
import { Extract } from 'tar';
|
||||
import { fromFile } from 'check-hash';
|
||||
import wreck from 'wreck';
|
||||
import { mkdirp } from 'mkdirp';
|
||||
|
||||
const mkdirpAsync = promisify(mkdirp);
|
||||
const wreckGetAsync = promisify(wreck.get, wreck);
|
||||
const checkHashFromFileAsync = promisify(fromFile);
|
||||
const writeFileAsync = promisify(writeFile);
|
||||
|
@ -80,10 +82,15 @@ export default function downloadNodeBuilds(grunt) {
|
|||
};
|
||||
|
||||
const start = async (platform) => {
|
||||
const downloadDir = join(platform.nodeDir, '..');
|
||||
let downloadCounter = 0;
|
||||
let isDownloadValid = await checkShaSum(platform);
|
||||
let isDownloadValid = false;
|
||||
|
||||
if (isDownloadValid) return;
|
||||
await mkdirpAsync(downloadDir);
|
||||
if (grunt.option('skip-download')) {
|
||||
isDownloadValid = await checkShaSum(platform);
|
||||
if (isDownloadValid) return;
|
||||
}
|
||||
|
||||
grunt.log.ok('starting download ...');
|
||||
while (!isDownloadValid && (downloadCounter < downloadLimit)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue