Merge pull request #7283 from claui/fix-make-tmpfile

Ensure TMPDIR is set for Xcode’s `make`
This commit is contained in:
Mike McQuaid 2020-04-11 13:11:30 +01:00 committed by GitHub
commit 73df5891ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,10 @@ module Homebrew
ENV["GEM_HOME"] = gem_home
ENV["GEM_PATH"] = ENV["GEM_HOME"]
# Set TMPDIR so Xcode's `make` doesn't fall back to `/var/tmp/`,
# which may be not user-writable.
ENV["TMPDIR"] = ENV["HOMEBREW_TEMP"]
# Make RubyGems notice environment changes.
require "rubygems"
Gem.clear_paths