Permalink
Browse files

Fixes react-native link for apps with extra xcode projects in the roo…

…t folder

Summary:
Adds a ```sort``` to ```findProject(folder)``` to boost ones in IOS_BASE to the top. Otherwise, if for example there is a git submodule project in the root app folder, the method will pick that one instead and linking will fail.
Fixes issue #10494
Closes #10495

Differential Revision: D4069439

Pulled By: lacker

fbshipit-source-id: 4328ac55389ed51cb42759fcf8360e56d5058136
  • Loading branch information...
1 parent 25d9f86 commit 157a03dd8dc8c57e3e9f6b4116f10e7152cf23ee @robclouth robclouth committed with Facebook Github Bot Oct 24, 2016
Showing with 3 additions and 0 deletions.
  1. +3 −0 local-cli/core/config/ios/findProject.js
@@ -37,6 +37,9 @@ module.exports = function findProject(folder) {
})
.filter(project => {
return path.dirname(project) === IOS_BASE || !TEST_PROJECTS.test(project);
+ })
+ .sort((projectA, projectB) => {
+ return path.dirname(projectA) === IOS_BASE? -1 : 1;
});
if (projects.length === 0) {

0 comments on commit 157a03d

Please sign in to comment.