cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matrosov-nikita <...@git.apache.org>
Subject [GitHub] cordova-windows pull request #237: Cb 12636 Fix check_reqs to properly find ...
Date Fri, 14 Jul 2017 15:26:22 GMT
Github user matrosov-nikita commented on a diff in the pull request:

    https://github.com/apache/cordova-windows/pull/237#discussion_r127480919
  
    --- 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) {
    +        var instanceDir = path.join(instancesRoot, file);
    +        if (shell.test('-d', instanceDir)) {
    --- End diff --
    
    Can we use `fs.statSync` here?


---
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