-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CB-13927 - Modified xcodeProjDir to filter out files/folders that contain "._" #355
Conversation
I ran into an issue trying to add an ios plugin using a virtual machine. The code would return an array for the xcodeProjDir and then of course use the wrong one. It would use the one starting with "._ProjectName" which I believe is an MacOS hidden folder. I attempted to install the plugin on OsX but because it's a virtual machine it still had those hidden folders. I've made it so that it will filter those out while looking for the proper xCode project folder.
I'm new to this, and I see my code failed the test. Is this the only thing it failed on? C:\projects\cordova-ios\bin\templates\scripts\cordova\Api.js |
Hi @asoap, Looks like those are the only errors, so fixing these should be enough to get the CI passing |
Codecov Report
@@ Coverage Diff @@
## master #355 +/- ##
==========================================
- Coverage 63.45% 63.38% -0.07%
==========================================
Files 14 14
Lines 1691 1696 +5
Branches 284 286 +2
==========================================
+ Hits 1073 1075 +2
- Misses 618 621 +3
Continue to review full report at Codecov.
|
YAY!!!!! Look at me, I'm helping. 👯♂️ |
@asoap I would like to get this in, however two things are needed:
|
Ping @asoap . If no progress on this for this week, this will be bumped until next release. |
} | ||
} | ||
xcodeProjDir = xcodeProjDir_array[0]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think this would be more efficient and clearer, what do you think?
var xcodeProjDir_array = fs
.readdirSync(this.root)
.filter(function (elem) {
// match .xcodeproj, and not start with '._'
return elem.match(/\.xcodeproj$/i) && (elem.substring(0, 2) !== '._');
})
xcodeProjDir = xcodeProjDir_array[0];
Added JIRA issue, modified the title, and commented on the code. |
…tain "._" (apache#355) * Modified xcodeProjDir to filter out files/folders that contain "._" I ran into an issue trying to add an ios plugin using a virtual machine. The code would return an array for the xcodeProjDir and then of course use the wrong one. It would use the one starting with "._ProjectName" which I believe is an MacOS hidden folder. I attempted to install the plugin on OsX but because it's a virtual machine it still had those hidden folders. I've made it so that it will filter those out while looking for the proper xCode project folder.
I ran into an issue trying to add an ios plugin using a virtual machine. The code would return an array for the xcodeProjDir and then of course use the wrong one. It would use the one starting with "._ProjectName" which I believe is an MacOS hidden folder. I attempted to install the plugin on OsX but because it's a virtual machine it still had those hidden folders. I've made it so that it will filter those out while looking for the proper xCode project folder.
Platforms affected
Windows (host) / OSx (guest) virtual machines
What does this PR do?
Fixes a folder issue. Before it would try to use an incorrect folder for the xCode project.
What testing has been done on this change?
I made the change while trying to install a patch. It should work the same as before as this code is only executed if there is more than one folder returned from searching the file system.
Checklist