Browse Source

fix: avoid error if no extra user python dirs

Kyle P Davis 6 months ago
parent
commit
b67052263c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      .profile

+ 2 - 1
.profile

@@ -19,7 +19,8 @@ OS=$(uname -s)
 export PATH="$PATH:$HOME/.local/bin:$HOME/bin"
 
 # Setup user-specific Python overrides
-if [ "$OS" = "Darwin" ]; then
+_PY_BASE_DIR="$HOME/Library/Python/";
+if [ "$OS" = "Darwin" ] && [ -d "$_PY_BASE_DIR" ]; then
 	for PY_DIR in "$HOME/Library/Python/"*/; do
 		export PATH="$PY_DIR/bin:$PATH"
 	done