Fix my Homebrew-related paths for the Intel/ARM prefixes
- ID
f113969- date
2024-05-15 22:05:00+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
e6cf090- message
Fix my Homebrew-related paths for the Intel/ARM prefixes- changed files
1 file, 22 additions, 4 deletions
Changed files
config.fish (6629) → config.fish (7084)
diff --git a/config.fish b/config.fish
index 674b6f0..6adb0e4 100644
--- a/config.fish
+++ b/config.fish
@@ -62,15 +62,33 @@ prepend_to_path ~/repos/scripts/web
prepend_to_path ~/repos/flapi.sh
-# Paths for Ruby and bundler
-prepend_to_path /opt/homebrew/bin
-prepend_to_path /opt/homebrew/opt/ruby/bin
-prepend_to_path /opt/homebrew/lib/ruby/gems/3.3.0/bin
+# Path for Rust
+prepend_to_path ~/.cargo/bin
# Path for Python tools installed with pipx
prepend_to_path ~/.local/bin
+
+# Prepend any Homebrew-related directories to my PATH variable.
+#
+# Note that Homebrew installs into different directories depending on
+# whether you're on an Intel or Apple Silicon Mac. Eventually I can
+# delete this when I get rid of my last Intel Mac, but until then
+# I want to make sure I have the same paths on both machines.
+#
+# See https://docs.brew.sh/Installation
+
+if test (uname -m) = "arm64"
+ set HOMEBREW_PREFIX /opt/homebrew
+else
+ set HOMEBREW_PREFIX /usr/local
+end
+
+prepend_to_path $HOMEBREW_PREFIX/bin
+prepend_to_path $HOMEBREW_PREFIX/opt/ruby/bin
+
+
# This prevents me from installing packages with pip without being
# in a virtualenv first.
#