From 8e4aab92aa89471317bc4b6f0f741381c40e1979 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Sat, 30 Jun 2018 12:21:32 -0400 Subject: [PATCH] brew.sh: Test HOMEBREW_TEMP, not hardcoded tmpdir --- Library/Homebrew/brew.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 42c5b7bb16..4db0e27bc3 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -144,6 +144,7 @@ export HOMEBREW_BREW_FILE export HOMEBREW_PREFIX export HOMEBREW_REPOSITORY export HOMEBREW_LIBRARY +export HOMEBREW_TEMP # Declared in brew.sh export HOMEBREW_VERSION @@ -295,7 +296,7 @@ EOS check-run-command-as-root check-prefix-is-not-tmpdir() { - if [[ $(realpath "${HOMEBREW_PREFIX}") = /private/tmp/* ]] + if [[ "${HOMEBREW_PREFIX}" = "${HOMEBREW_TEMP}"* ]] then odie <