From 158b05543b804813c9e7c3ab5225a0d845f29e76 Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Tue, 15 Mar 2016 19:51:36 +0000 Subject: [PATCH] Only set HOMEBREW_GITHUB_API_TOKEN if it makes sense. --- .bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index a099abc..2471f6f 100755 --- a/.bashrc +++ b/.bashrc @@ -59,7 +59,9 @@ pathadd ~/bin #-------------------------------------------------------------------------------- # Set some variables #-------------------------------------------------------------------------------- -export HOMEBREW_GITHUB_API_TOKEN=$(getkey HOMEBREW_GITHUB_API_TOKEN) +if [ -x "$(which brew 2>/dev/null)" ]; then + export HOMEBREW_GITHUB_API_TOKEN=$(getkey HOMEBREW_GITHUB_API_TOKEN) +fi #-------------------------------------------------------------------------------- #--------------------------------------------------------------------------------