REACT_NATIVE_DIR needs quoting to retain spaces

Summary:
${REACT_NATIVE_DIR} needs to be quoted as "${REACT_NATIVE_DIR}" otherwise projects paths with spaces in, will fail to build.

e.g. a project in `/home/me/some folder` will fail to build with:

```
../node_modules/react-native/packager/react-native-xcode.sh: line 37: cd: /home/me/some: No such file or directory
```
Closes https://github.com/facebook/react-native/pull/11487

Differential Revision: D4336281

Pulled By: lacker

fbshipit-source-id: c5d19fbd21978714c7af44c305ba854477118e1d
This commit is contained in:
Jay Caines-Gooby 2016-12-15 23:32:55 -08:00 committed by Facebook Github Bot
parent 330bff1323
commit 4431a3abf2
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ esac
REACT_NATIVE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" REACT_NATIVE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# Xcode project file for React Native apps is located in ios/ subfolder # Xcode project file for React Native apps is located in ios/ subfolder
cd ${REACT_NATIVE_DIR}/../.. cd "${REACT_NATIVE_DIR}"/../..
# Define NVM_DIR and source the nvm.sh setup script # Define NVM_DIR and source the nvm.sh setup script
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm" [ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"