SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

fix: codegen - project paths with spaces (#31141)

Summary:
- Fixed iOS codegen script incorrectly splitting root project paths that contain spaces
https://github.com/react-native-community/releases/issues/214#issuecomment-793089063

iOS builds were failing on 0.64.0-rc.4 for projects that contained spaces in the root directory path. The error logs pointed to the codegen script not being able to find a directory. The path was being split at a space in one of the folder names. This PR modifies the codegen script to include the spaces and use the entire project root path.

## Changelog

[Internal] fix: codegen script failing for iOS builds on projects with spaces in root directory path

Pull Request resolved: https://github.com/facebook/react-native/pull/31141

Test Plan:
Failing Test: Upgrade or init a new project and make sure that the project root directory contains a space (ex: /Users/test/cool projects/app/). With a clean install of node_modules and pods, attempt to build the project with Xcode. The build fails with an error running the script in FBReactNativeSpec (no such file or directory).

Passing Test: Include the changes presented in this PR and rerun the failing test (clean node_modules + PR patch/clean pods). The app should build.

Reviewed By: mdvacca

Differential Revision: D28255539

Pulled By: hramos

fbshipit-source-id: d44011985750639bd2fabfd40ed645d4eb661bd7
C
Craig Martin committed
b2e2f43ec3d43a36c4682bf3f92b0154cc2dc55f
Parent: 438a4cf
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 5/6/2021, 6:19:44 PM