mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
fix(fish): check a few homebrew paths that created errors
This commit is contained in:
@@ -27,13 +27,24 @@ if command -v nvim >/dev/null 2>&1
|
||||
set -x GIT_EDITOR nvim
|
||||
end
|
||||
|
||||
# Check for Homebrew path
|
||||
# Determine Homebrew prefix based on architecture
|
||||
if test (uname -m) = arm64
|
||||
set brew_prefix /opt/homebrew
|
||||
else
|
||||
set brew_prefix /usr/local
|
||||
end
|
||||
|
||||
# Check if essential commands are in PATH, if not add them
|
||||
if not command -v podman >/dev/null 2>&1 || not command -v brew >/dev/null 2>&1
|
||||
# Add Homebrew to PATH if not already there
|
||||
if not contains $brew_prefix/bin $PATH
|
||||
set -x PATH $brew_prefix/bin $PATH
|
||||
end
|
||||
end
|
||||
|
||||
# Initialize Homebrew environment
|
||||
eval "$($brew_prefix/bin/brew shellenv)"
|
||||
|
||||
set -x HOMEBREW_NO_AUTO_UPDATE 1
|
||||
|
||||
# XDG base directory specification
|
||||
@@ -85,9 +96,6 @@ if test -f $asdf_path/libexec/asdf.fish
|
||||
set -x PATH $HOME/.asdf/shims $PATH
|
||||
end
|
||||
|
||||
# Homebrew
|
||||
eval "$($brew_prefix/bin/brew shellenv)"
|
||||
|
||||
# Volta
|
||||
set -x PATH $PATH $VOLTA_HOME/bin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user