From b24063125b40c93b43ebdfd2e99a096218b8ef75 Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Mon, 6 May 2024 14:26:36 -0400 Subject: [PATCH] Add asdf to .zshenv to fix GOPATH issues on a purely asdf Go runtime install --- chezmoi/dot_zshenv | 8 ++++++++ chezmoi/dot_zshrc.d/executable_asdf.zsh | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/chezmoi/dot_zshenv b/chezmoi/dot_zshenv index 9300c63..c026821 100644 --- a/chezmoi/dot_zshenv +++ b/chezmoi/dot_zshenv @@ -2,6 +2,14 @@ export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:${PATH export LANG='en_US.UTF-8' export PAGER='less -RF' +if [ -r ~/.asdf/asdf.sh ]; then + ASDF_FORCE_PREPEND=1 . ~/.asdf/asdf.sh +fi + +if command -v brew &> /dev/null && [ -r "$(brew --prefix)/opt/asdf/libexec/asdf.sh" ]; then + . "$(brew --prefix)/opt/asdf/libexec/asdf.sh" +fi + for editor in nvim vim nano; do if command -v "$editor" &> /dev/null; then export EDITOR="$editor" diff --git a/chezmoi/dot_zshrc.d/executable_asdf.zsh b/chezmoi/dot_zshrc.d/executable_asdf.zsh index 38eeb08..0742a5f 100644 --- a/chezmoi/dot_zshrc.d/executable_asdf.zsh +++ b/chezmoi/dot_zshrc.d/executable_asdf.zsh @@ -1,11 +1,3 @@ -if [ -r ~/.asdf/asdf.sh ]; then - ASDF_FORCE_PREPEND=1 . ~/.asdf/asdf.sh -fi - -if command -v brew &> /dev/null && [ -r "$(brew --prefix)/opt/asdf/libexec/asdf.sh" ]; then - . "$(brew --prefix)/opt/asdf/libexec/asdf.sh" -fi - if [ -n "$ASDF_DIR" ]; then # append completions to fpath fpath=(${ASDF_DIR}/completions $fpath)