Github user alsorokin commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/237#discussion_r127631518 --- Diff: template/cordova/lib/MSBuildTools.js --- @@ -171,6 +182,54 @@ function getAvailableUAPVersions() { }); return result; +}; + +/** + * Lists all VS 2017+ instances dirs in ProgramData + * + * @return {String[]} List of paths to all VS2017+ instances + */ +function getWillowProgDataPaths() { + if (!process.env.systemdrive) { + // running on linux/osx? + return []; + } + var instancesRoot = path.join(process.env.systemdrive, 'ProgramData/Microsoft/VisualStudio/Packages/_Instances'); + if (!shell.test('-d', instancesRoot)) { + // can't seem to find VS instances dir, return empty result + return []; + } + + return fs.readdirSync(instancesRoot).map(function(file) { --- End diff -- `filter` would leave it as a relative path, but we need to make an absolute one.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org