cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-13293) already fetched platforms shouldn't call fetch code
Date Mon, 11 Dec 2017 22:47:00 GMT

    [ https://issues.apache.org/jira/browse/CB-13293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16286685#comment-16286685
] 

ASF GitHub Bot commented on CB-13293:
-------------------------------------

stevengill commented on a change in pull request #605: CB-13293 : if fetch has been called
already, no need to fetch again
URL: https://github.com/apache/cordova-lib/pull/605#discussion_r156223288
 
 

 ##########
 File path: src/cordova/platform/addHelper.js
 ##########
 @@ -292,7 +292,9 @@ function getVersionFromConfigFile (platform, cfg) {
 function downloadPlatform (projectRoot, platform, version, opts) {
     var target = version ? (platform + '@' + version) : platform;
     return Q().then(function () {
-        if (opts.fetch) {
+        var platformPath = path.join(projectRoot, 'platforms', platform);
+        var platformAlreadyAdded = fs.existsSync(platformPath);
+        if ((opts.fetch) && (!platformAlreadyAdded)) {
 
 Review comment:
   in line 333, `libDir` is defined? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> already fetched platforms shouldn't call fetch code
> ---------------------------------------------------
>
>                 Key: CB-13293
>                 URL: https://issues.apache.org/jira/browse/CB-13293
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-lib
>            Reporter: Steve Gill
>            Assignee: Audrey So
>              Labels: tools-next
>             Fix For: cordova@7.1.0
>
>
> adding a platform that has already been added/fetched will still call cordova-fetch before
realizing the platform is already installed. Need to check if platform is added first. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message