Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENV: SDK can be nil #7694

Merged
merged 1 commit into from Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/extend/os/mac/extend/ENV/std.rb
Expand Up @@ -81,7 +81,7 @@ def macosxsdk(version = nil, formula: nil)
prepend "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib"

sdk = formula ? MacOS.sdk_for_formula(formula, version) : MacOS.sdk(version)
return if !MacOS.sdk_root_needed? && sdk.source != :xcode
return if !MacOS.sdk_root_needed? && sdk&.source != :xcode

sdk = sdk.path

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/extend/os/mac/extend/ENV/super.rb
Expand Up @@ -108,7 +108,7 @@ def set_x11_env_if_installed
# @private
def setup_build_environment(formula = nil)
sdk = formula ? MacOS.sdk_for_formula(formula) : MacOS.sdk
if MacOS.sdk_root_needed? || sdk.source == :xcode
if MacOS.sdk_root_needed? || sdk&.source == :xcode
self["HOMEBREW_SDKROOT"] = sdk.path
self["HOMEBREW_DEVELOPER_DIR"] = if sdk.source == :xcode
MacOS::Xcode.prefix
Expand Down