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

bin/brew: don't set blank HOMEBREW_* variables. #2635

Merged
merged 1 commit into from
May 14, 2017
Merged
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
4 changes: 4 additions & 0 deletions bin/brew
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library"
for VAR in AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY BINTRAY_USER BINTRAY_KEY \
BROWSER EDITOR GIT PATH VISUAL
do
# Skip if variable value is empty.
[[ -z "${!VAR}" ]] && continue

VAR_NEW="HOMEBREW_${VAR}"
# Skip if existing HOMEBREW_* variable is set.
[[ -n "${!VAR_NEW}" ]] && continue
export "$VAR_NEW"="${!VAR}"
done
Expand Down