فهرست منبع

fix: avoid error if no extra user python dirs

Kyle P Davis 8 ماه پیش
والد
کامیت
b67052263c
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  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