{bash,zsh}rc: move goenv higher up to not interfere with other envs

This commit is contained in:
Aminda Suomalainen 2024-07-16 12:22:57 +03:00
parent 9d7089ea44
commit e4d723c770
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
2 changed files with 20 additions and 20 deletions

View File

@ -260,6 +260,16 @@ export LOCALDOMAIN=.
# regardless of whether DNSSEC=true or not. # regardless of whether DNSSEC=true or not.
export RES_OPTIONS="timeout:2 attempts:2 rotate edns0 trust-ad" export RES_OPTIONS="timeout:2 attempts:2 rotate edns0 trust-ad"
# https://github.com/go-nv/goenv
if [ -d ~/.goenv/bin ]; then
export GOENV_ROOT="$HOME/.goenv"
PATH="$HOME/.goenv/bin:$PATH"
#goenv init > /dev/null 2>&1
eval "$(goenv init -)"
PATH="$GOROOT/bin:$PATH"
PATH="$PATH:$GOPATH/bin"
fi
# https://github.com/nvm-sh/nvm # https://github.com/nvm-sh/nvm
if [ -d ~/.nvm ]; then if [ -d ~/.nvm ]; then
. ~/.nvm/nvm.sh . ~/.nvm/nvm.sh
@ -296,16 +306,6 @@ if [ -d ~/.nodenv/bin ]; then
# git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build # git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
fi fi
# https://github.com/go-nv/goenv
if [ -d ~/.goenv/bin ]; then
export GOENV_ROOT="$HOME/.goenv"
PATH="$HOME/.goenv/bin:$PATH"
#goenv init > /dev/null 2>&1
eval "$(goenv init -)"
PATH="$GOROOT/bin:$PATH"
PATH="$PATH:$GOPATH/bin"
fi
# Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896 # Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}') PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')

View File

@ -225,6 +225,16 @@ export LOCALDOMAIN=.
# regardless of whether DNSSEC=true or not. # regardless of whether DNSSEC=true or not.
export RES_OPTIONS="timeout:2 attempts:2 rotate edns0 trust-ad" export RES_OPTIONS="timeout:2 attempts:2 rotate edns0 trust-ad"
# https://github.com/go-nv/goenv
if [ -d ~/.goenv/bin ]; then
export GOENV_ROOT="$HOME/.goenv"
PATH="$HOME/.goenv/bin:$PATH"
#goenv init > /dev/null 2>&1
eval "$(goenv init -)"
PATH="$GOROOT/bin:$PATH"
PATH="$PATH:$GOPATH/bin"
fi
# https://github.com/nvm-sh/nvm # https://github.com/nvm-sh/nvm
if [ -d ~/.nvm ]; then if [ -d ~/.nvm ]; then
. ~/.nvm/nvm.sh . ~/.nvm/nvm.sh
@ -261,16 +271,6 @@ if [ -d ~/.nodenv/bin ]; then
# git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build # git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
fi fi
# https://github.com/go-nv/goenv
if [ -d ~/.goenv/bin ]; then
export GOENV_ROOT="$HOME/.goenv"
PATH="$HOME/.goenv/bin:$PATH"
#goenv init > /dev/null 2>&1
eval "$(goenv init -)"
PATH="$GOROOT/bin:$PATH"
PATH="$PATH:$GOPATH/bin"
fi
# Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896 # Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}') PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')