Skip to content

Commit

Permalink
adjust homebrew PATH during init scripts and in zshrc file
Browse files Browse the repository at this point in the history
  • Loading branch information
jls5177 committed Apr 16, 2024
1 parent 50a295f commit f310096
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions home/dot_zshrc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ plugins=(
{{- if eq .chezmoi.os "darwin" }}
macos
brew
{{- else if eq .chezmoi.os "linux" }}
brew
{{- end }}
)

Expand Down Expand Up @@ -103,7 +105,3 @@ fi
unset __conda_setup
# <<< conda initialize <<<
{{ end }}

{{ if eq .chezmoi.os "linux" }}
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
{{ end }}
2 changes: 0 additions & 2 deletions home/run_onchange_01_install-packages.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ sudo apt install -y zsh direnv byobu python3 python-is-python3 virtualenv sshpas
log::always "Installing Charmbracelet packages"
{{- if lt .osversion "24.04" }}
log::always "Installing Golang from homebrew as Ubunut 22.04 does not have Golang 20 or greater"
# ensure homebrew binaries are first in path to use the new Golang for installs
export PATH="/home/linuxbrew/.linuxbrew/bin/:$PATH"
# fallback to homebrew on Ubuntu 22.04 as Golang is stuck at v18
brew install go
{{ end }}
Expand Down
1 change: 1 addition & 0 deletions scripts/install_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ elif [[ "$(util::host_os)" == "linux"* ]]; then
ansi --green "Homebrew not installed. Installing..."
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/home/linuxbrew/.linuxbrew/bin/brew analytics off
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi

if util::is_available chezmoi; then
Expand Down

0 comments on commit f310096

Please sign in to comment.