From 8f12a34ce00fa55724d4252c49c6235fec510cfb Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Wed, 8 Apr 2020 09:28:21 +0100 Subject: [PATCH] shims/mac/super/xcrun: unset rather than emptying DEVELOPER_DIR --- Library/Homebrew/shims/mac/super/xcrun | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/shims/mac/super/xcrun b/Library/Homebrew/shims/mac/super/xcrun index 7f5e95dec0..a74834fd66 100755 --- a/Library/Homebrew/shims/mac/super/xcrun +++ b/Library/Homebrew/shims/mac/super/xcrun @@ -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