[ https://issues.apache.org/jira/browse/CB-8954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14559681#comment-14559681 ]
ASF GitHub Bot commented on CB-8954: ------------------------------------ Github user TimBarham commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/83#discussion_r31070257 --- Diff: bin/lib/check_reqs.js --- @@ -17,17 +17,101 @@ under the License. */ -var Q = require('Q'), - os = require('os'), +/*jshint node:true*/ + +var Q = require('Q'); + +var MSBuildTools; +try { MSBuildTools = require('../../template/cordova/lib/MSBuildTools'); +} catch (ex) { + // If previous import fails, we probably running this script + // from installed platform and the module location is different. + MSBuildTools = require('./MSBuildTools'); +} + +/** + * Check if current OS is supports building windows platform + * @return {Promise} Promise either fullfilled or rejected with error message. + */ +var checkOS = function () { + var platform = process.platform; + return (platform === 'win32') ? + Q.resolve(platform): + // Build Universal windows apps available for windows platform only, so we reject on others platforms + Q.reject('Cordova tooling for Windows requires Windows OS to build project'); +}; + +/** + * Checks if MSBuild tools is available. + * @return {Promise} Promise either fullfilled with MSBuild version + * or rejected with error message. + */ +var checkMSBuild = function () { + return MSBuildTools.findAvailableVersion() + .then(function (msbuildTools) { + // return Q.resolve('MSBuild tools v.' + msbuildTools.version + ' found at ' + msbuildTools.path); --- End diff -- Remove commented line. > Update platform check_reqs script to return structured result to > 'requirements' command > --------------------------------------------------------------------------------------- > > Key: CB-8954 > URL: https://issues.apache.org/jira/browse/CB-8954 > Project: Apache Cordova > Issue Type: Bug > Components: Android, iOS, Windows, WP8 > Reporter: Vladimir Kotikov > Assignee: Vladimir Kotikov > > Since {{requirements}} LIB method assumes that underlying platform script > will be {{require}}d instead of spawning child process and capturing output, > we need to modify these scripts to provide method that will be called for > getting current requirements status. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org