Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] fixes Xcode path issues containing whitespace when building Release #24810

Closed
wants to merge 2 commits into from

Conversation

reimertz
Copy link

@reimertz reimertz commented May 10, 2019

Summary

Some users (me included) have projects located in quirky places, resulting whitespaces in the path.
An example, , I symlink into my iCloud drive which result in the following path

/Users/r/Library/Mobile Documents/com~apple~CloudDocs/_/work/{a_company}/repos.nosync/app

This commit quotes the variable to make sure it gets properly passed to the CLI.

For reference, similar issue that has been resolved: https://github.com/react-native/react-native/commit/7d4e94edccfc2f642fcbd1d6aa00756f02e3a525

Test Plan

I ran current tests without issues.

Any suggestions how to write a test that catch these issues in the future? I couldn't find any tests related to xcode builds.

Changelog

[iOS] [Fixed] - Fixes whitespace issues when building Release from Xcode

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 10, 2019
@reimertz reimertz changed the title fixes Xcode path issues containing whitespace [iOS] fixes Xcode path issues containing whitespace when building Release May 10, 2019
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code analysis results:

  • shellcheck found some issues.

@@ -57,7 +57,7 @@ REACT_NATIVE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# in node_modules.
PROJECT_ROOT=${PROJECT_ROOT:-"$REACT_NATIVE_DIR/../.."}

cd $PROJECT_ROOT
cd "$PROJECT_ROOT"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SC2164: (warning) Use cd ... || exit in case cd fails.

@react-native-bot react-native-bot added Platform: iOS iOS applications. Bug labels May 10, 2019
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by Pierre Reimertz in f0770b6.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: iOS iOS applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants