aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar thomasvl <thomasvl@google.com>2018-06-13 11:21:02 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-13 11:22:25 -0700
commita320e4460f35767da7fc8eb824ce1f4b304b5e0f (patch)
treef3762ad85d9e859d0da7b8fc60f2c360f02da236 /tools
parenta8876b1518b6a5d1d8c145b5087d5c7d486e21d9 (diff)
Don't rerun the command if it failed.
While the original intent was to provide better messaging, the truth is things like ibtool and actool can error because of the state of CoreServices when targeting anything other than macOS. It appears this attempt to validate the sdk argument ends up succeeding in some cases, meaning it doesn't fail quickly, it does a fair mount of work, which we promptly throw away and still return the original error result. Rather then trying to expand this into some even more completely retry logic it seems better to back away from this attempted messaging instead. Looking at at history the better messaging stems from why it was recommended that folks also pass the SDK version along with the Xcode version, but we've gone back to just saying specific the Xcode version, so need for this improved messaging has also been reduced. PiperOrigin-RevId: 200422952
Diffstat (limited to 'tools')
-rwxr-xr-xtools/objc/xcrunwrapper.sh16
1 files changed, 0 insertions, 16 deletions
diff --git a/tools/objc/xcrunwrapper.sh b/tools/objc/xcrunwrapper.sh
index 7b27bf5482..e005895881 100755
--- a/tools/objc/xcrunwrapper.sh
+++ b/tools/objc/xcrunwrapper.sh
@@ -59,20 +59,4 @@ for ARG in "$@" ; do
UPDATEDARGS+=("${ARG}")
done
-set +e
/usr/bin/xcrun "${TOOLNAME}" "${UPDATEDARGS[@]}"
-XCRUN_EXITCODE=$?
-set -e
-REGEX="^(.*)sdk\" cannot be located(.*)$"
-if [[ ${XCRUN_EXITCODE} -ne 0 ]] ; then
- # If xcrun failed it is assumed it will fail again in the same fashion.
- # The second invocation is because combining and collecting stderr while
- # preserving and emitting stdout is difficult without additional file IO.
- XCRUN_OUTPUT="$(/usr/bin/xcrun "${TOOLNAME}" "${UPDATEDARGS[@]}" 2>&1)"
- if [[ "${XCRUN_OUTPUT}" =~ ${REGEX} ]] ; then
- echo "xcrunwrapper: SDK not located. This may indicate that the xcode and \
-SDK version pair is not available."
- fi
-fi
-
-exit ${XCRUN_EXITCODE}