From a320e4460f35767da7fc8eb824ce1f4b304b5e0f Mon Sep 17 00:00:00 2001 From: thomasvl Date: Wed, 13 Jun 2018 11:21:02 -0700 Subject: 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 --- tools/objc/xcrunwrapper.sh | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'tools') 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} -- cgit v1.2.3