diff options
| author | Mike McQuaid | 2017-05-14 20:05:26 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2017-05-14 20:05:26 +0100 |
| commit | 9c85d737add16eb574740c637d498b8610dae0ca (patch) | |
| tree | ff8a7dfdedadf707d05a8d88af0e2a913dd46491 | |
| parent | e0ab162f82921077cfb899637fdd39e426adfc9b (diff) | |
| download | brew-9c85d737add16eb574740c637d498b8610dae0ca.tar.bz2 | |
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.
| -rwxr-xr-x | bin/brew | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |
