windows-build-tools
Advanced tools
Comparing version 4.0.0-alpha.12 to 4.0.0-alpha.13
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const chalk_1 = require("chalk"); | ||
const constants_1 = require("./constants"); | ||
const download_1 = require("./download"); | ||
const logging_1 = require("./logging"); | ||
const offline_1 = require("./offline"); | ||
@@ -14,8 +16,23 @@ /** | ||
async function aquireInstallers(cb) { | ||
const handleFailure = (error) => { | ||
logging_1.log(chalk_1.default.bold.red(`Downloading installers failed. Error:`), error); | ||
logging_1.log(chalk_1.default.bold.red(`windows-build-tools will now exit.`)); | ||
process.exit(1); | ||
}; | ||
if (constants_1.OFFLINE_PATH) { | ||
await offline_1.copyInstallers(); | ||
cb(); | ||
try { | ||
await offline_1.copyInstallers(); | ||
cb(); | ||
} | ||
catch (error) { | ||
handleFailure(error); | ||
} | ||
} | ||
else { | ||
download_1.download(cb); | ||
try { | ||
await download_1.download(cb); | ||
} | ||
catch (error) { | ||
handleFailure(error); | ||
} | ||
} | ||
@@ -22,0 +39,0 @@ } |
@@ -77,4 +77,2 @@ "use strict"; | ||
debug('Install: Build tools tailer exited'); | ||
logStatus(); | ||
stopLog(); | ||
if (result === 'error') { | ||
@@ -89,2 +87,7 @@ debug('Installer: Tailer found error with installer', details); | ||
} | ||
// Stop the log now. If we need to report failures, we need | ||
// to do it after the single-line-logger has stopped messing | ||
// with the terminal. | ||
logStatus(); | ||
stopLog(); | ||
if (result === 'failure') { | ||
@@ -91,0 +94,0 @@ logging_1.log(chalk_1.default.bold.red('\nCould not install Visual Studio Build Tools.')); |
{ | ||
"name": "windows-build-tools", | ||
"version": "4.0.0-alpha.12", | ||
"version": "4.0.0-alpha.13", | ||
"description": "Install C++ Build Tools for Windows using npm", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88674
1067