Merge pull request #7303 from Bo98/xcrun

shims/mac/super/xcrun: unset rather than emptying DEVELOPER_DIR
This commit is contained in:
Mike McQuaid 2020-04-08 14:46:46 +01:00 committed by GitHub
commit ba63e93b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,14 +4,14 @@
# it and attempts to avoid these issues.
# These could be used in conjunction with `--sdk` which ignores SDKROOT.
if [[ "$*" =~ (^| )-?-show-sdk-(path|version|build) ]]; then
if [[ "$*" =~ (^| )-?-show-sdk-(path|version|build) && -n "$HOMEBREW_DEVELOPER_DIR" ]]; then
export DEVELOPER_DIR=$HOMEBREW_DEVELOPER_DIR
else
# Some build tools set DEVELOPER_DIR, so discard it
unset DEVELOPER_DIR
fi
if [ -z "$SDKROOT" ]; then
if [[ -z "$SDKROOT" && -n "$HOMEBREW_SDKROOT" ]]; then
export SDKROOT=$HOMEBREW_SDKROOT
fi