wrap python path adder in if statement to prevent error

This commit is contained in:
Jeffrey Paul 2019-11-18 04:22:36 -08:00 committed by GitHub
parent 77018df61d
commit 66dee78df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,6 @@
# adds homebrew python packages dir to python paths # adds homebrew python packages dir to python paths
if [[ -d "$HOME/Library/Python/2.7/lib/python/site-packages/" ]]; then
echo "import site; site.addsitedir(\"$HOME/Library/Homebrew/lib/python2.7/site-packages\")" >> \ echo "import site; site.addsitedir(\"$HOME/Library/Homebrew/lib/python2.7/site-packages\")" >> \
$HOME/Library/Python/2.7/lib/python/site-packages/homebrew.pth $HOME/Library/Python/2.7/lib/python/site-packages/homebrew.pth
fi