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 libgit2#484 more flags were
added into the variable
sdkflag
, which then caused the followingexecution of run_xctool to always fail. This means that iOS tests have
not been running as part of the TravisCI run, they have only been built.
You can see this if you look at the final run for the PR:
https://travis-ci.org/libgit2/objective-git/builds/78334551#L192
Bash does some great things when trying to interpret variables in
commands. Initially the
$sdkflag
didn't have any quotes around it ascan be seen in commit 15f906c. When the
second flag was added this would have caused the command to fail because
of the way Bash would interpret the whitespace. Without the surrounding
quotes the command would have been executed as follows:
You can see in the above that the white space was split in the middle of
the
-destination
parameter and it causesxctool
to spout out anerror. When the surrounding quotes were added it caused xctool to run
but
$sdkflag
would be interpretted as a single argument, as it isexecuted as follows:
Notice in the above that the entire argument is still surrounded by
single quotes.
This can be solved by switching
$sdkflag
for an array of strings, thiscan then be correctly expanded in the command getting around the issues
highlighted above.
You can read more about these issues with Bash in the following links: