Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Xcode Archive task failing if project path contains whitespace
Summary: Currently, Xcodebuild Archive task "Bundle React Native code and images" step fails if the project path contains whitespace characters. This is due to `react-native-xcode.sh` not escaping the local CLI path. Ideally, of course, folks would use sane directory names, but this affects people in the community. I have seen this at a beginner hackathon, as well as Stack Overflow, e.g. https://stackoverflow.com/questions/48209829/cannot-create-offline-bundle-for-react-native-ios ``` mkdir Bad\ Name cd Bad\ Name react-native init TestProject cd TestProject open ios/TestProject.xcodeproj ``` * Run `Build > Archive` * `cli.js bundle` command fails with "Cannot find module '.../Bad'" * Patch `/node_modules/react-native/scripts/react-native-xcode.sh` with changed file * Run `Build > Archive` * Build succeeds <!-- Help reviewers and the release process by writing your own release notes **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [-{Component}-] [ INTERNAL ] [ ENHANCEMENT ] [ {File} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| [CATEGORY] [TYPE] [LOCATION] - MESSAGE EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scrip] - Added thing to script that nobody will see --> [IOS] [MINOR] [scripts/react-native-xcode.sh] - Escape directory paths with spaces Closes #17628 Differential Revision: D6806418 Pulled By: hramos fbshipit-source-id: 7ef3943d91807d0086f0717e436e1988f9faf03d
- Loading branch information