Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var _ = require("lodash");
var cmakejs = require("cmake-js");
var CMLog = cmakejs.CMLog;
var Bluebird = require("bluebird");
var fs = Bluebird.promisifyAll(require("fs-extra"));
var semver = require("semver");
var path = require("path");
var environment = cmakejs.environment;
var zlib = require("zlib");
var tar = require("tar");
var request = require("request");
var exec = require('child_process').exec;
function downloadTo(url, result) {
return new Bluebird(function (resolve, reject) {
request
.get(url)
.on('error', function (err) { reject(err); })
.pipe(result);
result.once("finish", function () { resolve(); });
});
}