You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/01/09 05:28:32 UTC

[GitHub] shazron closed pull request #355: CB-13927 - Modified xcodeProjDir to filter out files/folders that contain "._"

shazron closed pull request #355: CB-13927 - Modified xcodeProjDir to filter out files/folders that contain "._"
URL: https://github.com/apache/cordova-ios/pull/355
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bin/templates/scripts/cordova/Api.js b/bin/templates/scripts/cordova/Api.js
index dd50d11f8..9596b58fc 100644
--- a/bin/templates/scripts/cordova/Api.js
+++ b/bin/templates/scripts/cordova/Api.js
@@ -64,7 +64,17 @@ function Api (platform, platformRootDir, events) {
     var xcodeCordovaProj;
 
     try {
-        xcodeProjDir = fs.readdirSync(this.root).filter(function (e) { return e.match(/\.xcodeproj$/i); })[0];
+
+        var xcodeProjDir_array = fs.readdirSync(this.root).filter(function (e) { return e.match(/\.xcodeproj$/i); });
+        if (xcodeProjDir_array.length > 1) {
+            for (var x = 0; x < xcodeProjDir_array.length; x++) {
+                if (xcodeProjDir_array[x].substring(0, 2) === '._') {
+                    xcodeProjDir_array.splice(x, 1);
+                }
+            }
+        }
+        xcodeProjDir = xcodeProjDir_array[0];
+
         if (!xcodeProjDir) {
             throw new CordovaError('The provided path "' + this.root + '" is not a Cordova iOS project.');
         }


 

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


With regards,
Apache Git Services

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