[Build script] Remove double-quotes around variables to fix incorrect array expansion #8413
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to use Realm within our app, we need to rebuild it with some extra settings enabled. While experimenting, I noticed what appears to be a bug in Realm's build script:
When adding more than one argument to the
REALM_EXTRA_BUILD_ARGUMENTS
variable, the arguments get passed toxcodebuild
as a single string, rather than multiple space-separated strings.An example:
Note the last two arguments in the
xcodebuild
invocation are surrounded by double-quotes, soxcodebuild
interprets them as a single argument.I've run into this exact issue before when writing my own build scripts in Bash. It has to do with how Bash does array expansion. Luckily the fix is pretty simple, just to remove double-quotes from a couple places.
Here's a diff of the
xcodebuild
output before and after the fix is applied: