shims/mac/super/xcrun: unset rather than emptying DEVELOPER_DIR

This commit is contained in:
Bo Anderson 2020-04-08 09:28:21 +01:00
parent 2ae26808a6
commit 8f12a34ce0

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