cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alsorokin <...@git.apache.org>
Subject [GitHub] cordova-windows pull request #237: Cb 12636 Fix check_reqs to properly find ...
Date Mon, 17 Jul 2017 04:26:29 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message