From 2b130af8b3b4034c18a30cd41447c69eed6c5497 Mon Sep 17 00:00:00 2001 From: Jasper Abbink Date: Tue, 12 Mar 2019 10:18:29 +0100 Subject: [PATCH] fix unhelpful log message with wrong MSVS version Closes #147 Right now it would crash with this error, instead of returning the helpful message about setting msvs to a different version. ```javascript console.log('Invalid msvs_version ' + msvsVersion + '\n'); ^ ReferenceError: msvsVersion is not defined ``` --- install.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.js b/install.js index 8dffce7b..5bf3fd50 100755 --- a/install.js +++ b/install.js @@ -309,7 +309,7 @@ function errorSetMSVSVersion() { } function errorInvalidMSVSVersion() { - console.log('Invalid msvs_version ' + msvsVersion + '\n'); + console.log('Invalid msvs_version ' + process.env.npm_config_msvs_version + '\n'); console.log('Please set your Microsoft Visual Studio version before you run npm install'); console.log('Example for Visual Studio 2015:\n'); console.log(' For you user only:\n'); @@ -371,4 +371,4 @@ if (os.platform() !== 'win32') { }); }); } -} \ No newline at end of file +}