You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2015/07/13 13:07:31 UTC
cordova-windows git commit: CB-9239 Fixes issue with windows prepare
on posix platforms
Repository: cordova-windows
Updated Branches:
refs/heads/CB-9239 [created] 3f167e0aa
CB-9239 Fixes issue with windows prepare on posix platforms
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/3f167e0a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/3f167e0a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/3f167e0a
Branch: refs/heads/CB-9239
Commit: 3f167e0aa0c7f3301b0056bd28a93f73385673c7
Parents: b4eb9d7
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Mon Jul 13 13:37:09 2015 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Mon Jul 13 13:59:16 2015 +0300
----------------------------------------------------------------------
template/cordova/lib/MSBuildTools.js | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/3f167e0a/template/cordova/lib/MSBuildTools.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/MSBuildTools.js b/template/cordova/lib/MSBuildTools.js
index c325135..86ee8d4 100644
--- a/template/cordova/lib/MSBuildTools.js
+++ b/template/cordova/lib/MSBuildTools.js
@@ -71,15 +71,14 @@ function checkMSBuildVersion(version) {
return deferred.promise;
}
-function getProgramFiles32Folder() {
- /* jshint ignore:start */ /* Wants to use dot syntax for ProgramFiles, leaving as-is for consistency */
- return process.env['ProgramFiles(x86)'] || process.env['ProgramFiles'];
- /* jshint ignore:end */
-}
-
/// returns an array of available UAP Versions
function getAvailableUAPVersions() {
- var uapFolderPath = path.join(getProgramFiles32Folder(), 'Windows Kits', '10', 'Platforms', 'UAP');
+ /*jshint -W069 */
+ var programFilesFolder = process.env['ProgramFiles(x86)'] || process.env['ProgramFiles'];
+ // No Program Files folder found, so we won't be able to find UAP SDK
+ if (!programFilesFolder) return [];
+
+ var uapFolderPath = path.join(programFilesFolder, 'Windows Kits', '10', 'Platforms', 'UAP');
if (!shell.test('-e', uapFolderPath)) {
return []; // No UAP SDK exists on this machine
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org