summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-02-13 13:52:43 -0600
committerChristian Cleberg <[email protected]>2026-02-13 13:52:43 -0600
commitc3e1b1896ab156f6fa1529ebd630b065eff42efa (patch)
tree7fa5fb0557fcf73f4b07319aad7df00183f7a921
parent35ed726fc283a1e4fd5e9ed7b0357600311d3f30 (diff)
downloaddotfiles-c3e1b1896ab156f6fa1529ebd630b065eff42efa.tar.gz
dotfiles-c3e1b1896ab156f6fa1529ebd630b065eff42efa.tar.bz2
dotfiles-c3e1b1896ab156f6fa1529ebd630b065eff42efa.zip
fix homebrew path and profile
-rw-r--r--zsh/.zprofile16
-rw-r--r--zsh/.zshrc3
2 files changed, 16 insertions, 3 deletions
diff --git a/zsh/.zprofile b/zsh/.zprofile
index 37e194a..67eda70 100644
--- a/zsh/.zprofile
+++ b/zsh/.zprofile
@@ -1,2 +1,16 @@
+# ==============================================================================
+# HOMEBREW INITIALIZATION (macOS & Linux)
+# ==============================================================================
-eval "$(/opt/homebrew/bin/brew shellenv)"
+if [[ "$(uname)" == "Darwin" ]]; then
+ # macOS (Apple Silicon)
+ BREW_PATH="/opt/homebrew/bin/brew"
+elif [[ "$(uname)" == "Linux" ]]; then
+ # Linux (Linuxbrew)
+ BREW_PATH="/home/linuxbrew/.linuxbrew/bin/brew"
+fi
+
+# Only run shellenv if the brew binary actually exists at that path
+if [[ -f "$BREW_PATH" ]]; then
+ eval "$($BREW_PATH shellenv)"
+fi
diff --git a/zsh/.zshrc b/zsh/.zshrc
index f8a84ec..aab6477 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -23,9 +23,8 @@ fi
# 3. ENVIRONMENT VARIABLES & PATH
# ==============================================================================
-export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
export PATH="$HOME/.local/xonsh-env/xbin:$PATH"
-export PATH="$BREW_PREFIX:$PATH"
+export PATH="$BREW_PREFIX/bin:$PATH"
export GPG_TTY=$(tty)
# borgbackup