bin/brew: don't set blank HOMEBREW_* variables.
When creating the necessary HOMEBREW_* variables ensure that they aren't set if their value would be empty.
This commit is contained in:
parent
e0ab162f82
commit
9c85d737ad
4
bin/brew
4
bin/brew
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user