mirror of
https://github.com/status-im/react-native.git
synced 2025-02-24 23:28:12 +00:00
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 https://github.com/facebook/react-native/pull/17628 Differential Revision: D6806418 Pulled By: hramos fbshipit-source-id: 7ef3943d91807d0086f0717e436e1988f9faf03d
This commit is contained in:
parent
be56a3efee
commit
8aa568e867
@ -105,7 +105,7 @@ fi
|
||||
|
||||
BUNDLE_FILE="$DEST/main.jsbundle"
|
||||
|
||||
$NODE_BINARY $CLI_PATH $BUNDLE_COMMAND \
|
||||
$NODE_BINARY "$CLI_PATH" $BUNDLE_COMMAND \
|
||||
$CONFIG_ARG \
|
||||
--entry-file "$ENTRY_FILE" \
|
||||
--platform ios \
|
||||
|
Loading…
x
Reference in New Issue
Block a user