Skip to content

Commit

Permalink
Merge pull request #14384 from MikeMcQuaid/homebrew_install_from_api_dev
Browse files Browse the repository at this point in the history
brew.sh: test `HOMEBREW_INSTALL_FROM_API` on developers.
  • Loading branch information
MikeMcQuaid committed Jan 24, 2023
2 parents daf5b27 + 8e1bcd9 commit b8a9fe4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Library/Homebrew/brew.sh
Expand Up @@ -766,6 +766,16 @@ To turn developer mode off, run $(bold "brew developer off")
export HOMEBREW_DEV_CMD_RUN="1"
fi

# Test HOMEBREW_INSTALL_FROM_API on HOMEBREW_DEV_CMD_RUN and HOMEBREW_DEVELOPER
# folks who haven't run a HOMEBREW_DEVELOPER_COMMAND.
if [[ -z "${HOMEBREW_NO_INSTALL_FROM_API}" &&
-z "${HOMEBREW_INSTALL_FROM_API}" &&
-z "${HOMEBREW_DEVELOPER_COMMAND}" ]] &&
[[ -n "${HOMEBREW_DEV_CMD_RUN}" || -n "${HOMEBREW_DEVELOPER}" ]]
then
export HOMEBREW_INSTALL_FROM_API=1
fi

if [[ -f "${HOMEBREW_LIBRARY}/Homebrew/cmd/${HOMEBREW_COMMAND}.sh" ]]
then
HOMEBREW_BASH_COMMAND="${HOMEBREW_LIBRARY}/Homebrew/cmd/${HOMEBREW_COMMAND}.sh"
Expand Down

0 comments on commit b8a9fe4

Please sign in to comment.