summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Guschin <guschin.drew@gmail.com>2024-02-15 01:18:16 +0400
committerAndrew Guschin <guschin.drew@gmail.com>2024-02-15 01:18:16 +0400
commita0ae2aae839ed8bf66cd24965251e36ca88e266e (patch)
tree1d36860af608dca4097e4cea735010d67215dcc4
parent32f6fc9e260dec896d0aab88abb535762d6bc6e1 (diff)
.profile: additional check in macos for python and set RYE_HOME
-rw-r--r--.profile3
1 files changed, 2 insertions, 1 deletions
diff --git a/.profile b/.profile
index 4c1619e..043eb04 100644
--- a/.profile
+++ b/.profile
@@ -84,11 +84,12 @@ export GHCUP_USE_XDG_DIRS=true
# Python
# On Linux python executables installed with pip should be in ~/.local/bin
-if [ "$(uname)" = "Darwin" ]; then
+if [ "$(uname)" = "Darwin" ] && [ -f $HOME/Library/Python ]; then
_pypaths="$(du $HOME/Library/Python/*/bin | cut -f2 | paste -s -d ':' -)"
export PATH="$PATH:$_pypaths"
unset _pypaths
fi
+export RYE_HOME="$XDG_DATA_HOME/rye"
if [ "$(uname)" = "Darwin" ]; then
export PATH="$PATH:/opt/homebrew/bin"