From be0f0e82ed57e7befdabe39bd9f6c6454bcbcbd4 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Tue, 1 Nov 2022 03:08:04 +0000 Subject: [PATCH] Update dotfiles/.profile --- dotfiles/.profile | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/dotfiles/.profile b/dotfiles/.profile index f0ee5917..38b1063b 100644 --- a/dotfiles/.profile +++ b/dotfiles/.profile @@ -205,20 +205,24 @@ export PATH="$PATH:${GOPATH}/bin" if command -v brew >/dev/null; then ### Go - GOROOT="$(brew --prefix golang)/libexec" - export GOROOT - export PATH="$PATH:${GOROOT}/bin" + if command -v go > /dev/null; then + GOROOT="$(brew --prefix golang)/libexec" + export GOROOT + export PATH="$PATH:${GOROOT}/bin" + fi ### ASDF - export ASDF_CONFIG_FILE="$HOME/.config/asdf/asdfrc" - export ASDF_DIR="$HOME/.local/asdf" - export ASDF_DATA_DIR="$HOME/.local/asdf" - export ASDF_CRATE_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-cargo-pkgs - export ASDF_GEM_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-ruby-pkgs - export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-golang-pkgs - export ASDF_PYTHON_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-python-pkgs - if [ -f "$(brew --prefix asdf)/libexec/asdf.sh" ]; then - . "$(brew --prefix asdf)/libexec/asdf.sh" + if command -v asdf > /dev/null; then + export ASDF_CONFIG_FILE="$HOME/.config/asdf/asdfrc" + export ASDF_DIR="$HOME/.local/asdf" + # export ASDF_DATA_DIR="$HOME/.local/asdf" + export ASDF_CRATE_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-cargo-pkgs + export ASDF_GEM_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-ruby-pkgs + export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-golang-pkgs + export ASDF_PYTHON_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-python-pkgs + if [ -f "$(brew --prefix asdf)/libexec/asdf.sh" ]; then + . "$(brew --prefix asdf)/libexec/asdf.sh" + fi fi fi