Skip to content
Snippets Groups Projects
Commit 9c85d737 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

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.
parent e0ab162f
No related branches found
Tags 1.2.1
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment